in reply to How portable are common $! error codes?
What about
Of course it's possible that you will not print the error message if someone removes the file between the open() and the -f. Don't know if that matters to you.unless ( open INFILE, "<", $file ) { return unless -f $file; die "open failed: $!"; }
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
|
|---|