my @fileNames = ( "manimp1.txt", "manimp2.txt" ); foreach my $file (@fileNames) { processFile($file); } sub processFile { my $fileName = shift; open (....) ... what is supposed to happen here? }