You might also want to consider using IO::File objects ... you can also pass typeglobs
Or you can use lexical, autovivified filehandles. These are the variety I prefer:
open my $in, "<", $filename or die "open $filename: $!"; process($in); close $in;
In reply to Re^2: Opening a File If It Exists
by revdiablo
in thread Opening a File If It Exists
by Neuroactive
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |