in reply to Re^2: How to reset a variable for each file inside a while( <> ) loop?
in thread How to reset a variable for each file inside a while( <> ) loop?
I never use continue either; I just copied the code snippet (and tested it!) from the eof documentation. But, that code also used a next statement, which I deleted since it was not needed for your purposes. I should have also deleted the continue statement. I Read The Free Manual, as I'm sure you also did, which explains the relationship between continue and next.while (<>) { print "$.\n"; close ARGV if eof; }
|
---|