in reply to anonymous filehandle for overridden open sub
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': $!" ); }
|
|---|