Skip site navigation (1)Skip section navigation (2)
Date:      04 May 2003 13:58:38 +0300
From:      Ville =?ISO-8859-1?Q?Skytt=E4?= <scop@FreeBSD.org>
To:        freebsd-cvsweb@FreeBSD.org
Subject:   RE: Displaying line numbers
Message-ID:  <1052045918.3543.31.camel@bobcat.ods.org>
In-Reply-To: <6B1DF6EEBA51D31182F200902740436803B24F5B@mail-in.comverse.com>
References:  <6B1DF6EEBA51D31182F200902740436803B24F5B@mail-in.comverse.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1052045918.3543.31.camel>