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";
In reply to Re^2: Using open in for loop
by blazar
in thread Using open in for loop
by xmanamit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |