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'm glad you asked because, as it turns out, continue is not even needed in this case. Here is the simplified code:
while (<>) { print "$.\n"; close ARGV if eof; }
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.