in reply to Re: "or die" versus "|| die"
in thread "or die" versus "|| die"
Yes these is a difference, as jeffa pointed out: precedence. As long as you use parentheses around e.d. open, it doesn't matter, but else it really makes a difference if you say:
which will die when the open failes, or:open F, $file or die;
which will die if $file is false (undef, empty or 0), but NOT if the open fails!open F, $file || die
Paul
|
---|
In Section
Seekers of Perl Wisdom