Hi. I'm finding a peculiarity on file open (perl 5.8.3) that I can't find any explanation for in the doc.
When I call open as a command:
open $REQUESTFILE, '<', $aldbRequestFile || die "Unable to open ALdb Request file $aldbRequestFile: $!\n";
die never gets invoked when the file doesn't exist.
Yet, when I call it as a function:
open (my $REQUESTFILE, '<', $aldbRequestFile) || die "Unable to open ALdb Request file $aldbRequestFile: $!\n";
die works as expected.
Can one of the perl gurus please explain this?
Thanks,
Rick
Thanks very much ikegami and kennethk! Didn't even think of precedence