Displaying line numbers

VilleSkyttä scop at FreeBSD.org
Sun May 4 03:58:42 PDT 2003


On Fri, 2003-05-02 at 00:03, Khachaturov Vassilii wrote:

> > By the way, is there a function/ perl module for getting the number of
> > lines in a file?  `wc -l` of course works...  I think that would be
> > needed in order to get the line numbers properly left padded 
> > with spaces
> > like in
> > 
> >         1
> >     [...]
> >       100
> >     [...]
> 
> There's the mjd-s Tie::File module you might want to look at...

Yep, that looks good.  Unfortunately I forgot that we're dealing with
filehandles and *,v files so this isn't quite applicable :(  Using
hardcoded value (5) for line numbers for now.

-- 
\/ille Skyttä
scop at FreeBSD.org




More information about the freebsd-cvsweb mailing list