in reply to Re: Using open in for loop
in thread Using open in for loop

open(FILE,"$_") or die " Could not open file :$! " ;

In addition to everything else that has been said, the oft and rightly so repeated mantra is:

To which I add: "$_" is called "useless use of quotes." Thus:

open my $file, '<', $_ or die "Could not open `$_': $!\n";