From owner-freebsd-cvsweb@FreeBSD.ORG Sun May 4 03:58:42 2003 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7120437B401 for ; Sun, 4 May 2003 03:58:42 -0700 (PDT) Received: from smtp3.pp.htv.fi (smtp3.pp.htv.fi [213.243.153.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC9A143F93 for ; Sun, 4 May 2003 03:58:41 -0700 (PDT) (envelope-from scop@FreeBSD.org) Received: from posti.pp.htv.fi (posti.pp.htv.fi [212.90.64.50]) by smtp3.pp.htv.fi (Postfix) with ESMTP id A339127B00A for ; Sun, 4 May 2003 13:58:40 +0300 (EEST) Received: from cs78130147.pp.htv.fi (cs78130147.pp.htv.fi [62.78.130.147]) by posti.pp.htv.fi (8.11.1/8.11.1) with ESMTP id h44B0H911299 for ; Sun, 4 May 2003 14:00:17 +0300 (EETDST) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: freebsd-cvsweb@FreeBSD.org In-Reply-To: <6B1DF6EEBA51D31182F200902740436803B24F5B@mail-in.comverse.com> References: <6B1DF6EEBA51D31182F200902740436803B24F5B@mail-in.comverse.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: FreeBSD Message-Id: <1052045918.3543.31.camel@bobcat.ods.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 04 May 2003 13:58:38 +0300 Content-Transfer-Encoding: 8bit Subject: RE: Displaying line numbers X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list [restricted posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2003 10:58:42 -0000 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