Then read each line in the file, incrementing a counter for each line you read
Perl already does that for you:
1 while <$INPUTFILE>; my $line_count = $.;
In reply to Re^2: works on command line, but not from perl
by jwkrahn
in thread works on command line, but not from perl
by elwoodblues
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |