foreach $word (@ARGV) { open (IN, $word) or die "Cannot open file '$word': $!\n"; print "$word: ", $line = ; close (IN); }