go ahead... be a heretic | |
PerlMonks |
Re^3: How to process multiple input files?by jwkrahn (Abbot) |
on May 23, 2011 at 06:51 UTC ( [id://906248]=note: print w/replies, xml ) | Need Help?? |
He's always have a line-count of 1, since he's slurping the files. $. contains the current record count, and since each file is one record it will be incremented for each file and so will not always be 1. Unless of course you reset $. or close ARGV at the end of each file.
In Section
Seekers of Perl Wisdom
|
|