If you don't log why you couldn't open the filehandle, there's no point. Plus, open() implicitly performs a -e check, so that's superfluous. Now, doing a -d check might be more useful ...open( my $fh, "<", $file ); if ( $fh ) { ... } else { log_error( "Couldn't open $file for 'reading': $!" ); }
In reply to Re: anonymous filehandle for overridden open sub
by dragonchild
in thread anonymous filehandle for overridden open sub
by blahblahblah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |