in reply to Tricky Problem

A Linux command line answer is wc -l; there's no Perl required.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^2: Tricky Problem
by atcroft (Abbot) on Aug 19, 2004 at 18:12 UTC

    For that matter, in any of the solutions where a file is opened and they have looped through it, they can look at $. to find out the current line number (as long as they do it before they close the file). (See perlvar for further details.)

    (I also did not notice that part of the original posting earlier.)