No such thing as a small change | |
PerlMonks |
Re^2: "or die" versus "|| die"by davido (Cardinal) |
on Jun 24, 2005 at 15:44 UTC ( [id://469744]=note: print w/replies, xml ) | Need Help?? |
Just because you're invoking die after an || or a or doesn't mean you don't have to think about precedence. Consider the following:
If you use 'or' here, you'll die upon failure of somesub (assuming it returns false to indicate failure). If you use ||, you'll die if $that is false. Big difference. Dave
In Section
Seekers of Perl Wisdom
|
|