for my $file in ( @ARGV ) { open FILE, "<", $file; $my counter = 0; while ( ) { $counter ++; print; } ... }