in reply to How do I read the files in @ARGV one by one
perldoc -f eof
I'd like to encourage you to check out the above advice.
Here is an alternative that I am becoming fond of:
my @data; foreach my $file (@ARGV) { push @data, substr( $file, -12, 12 ); local( *ARGV ); @ARGV= ($file); push( @data, <> ); } [download]