in reply to use of 'continue' block for while/until

I most often use continue like this: I put the 'close ARGV if eof;' statement needed to reset $INPUT_LINE_NUMBER for each input filehandle (i.e., ARGV) in a continue block in the documented way:

use strict; use warnings; use English qw( -no_match_vars ); RECORD: while (my $record = <>) { # Line number 1 is a header... if ($INPUT_LINE_NUMBER == 1) { # Per-file preprocessing goes here... next RECORD; # Skip to next record... } # Per-record processing goes here... } continue { close ARGV if eof; }
Jim