Syntactic Confectionery Delight | |
PerlMonks |
Re: "or die" versus "|| die"by davidrw (Prior) |
on Jun 24, 2005 at 15:02 UTC ( [id://469730]=note: print w/replies, xml ) | Need Help?? |
I think in a lot of cases it doesn't matter (especially if die'ing), but there is a difference in precedence. perldoc perlop shows that || is higher than = and some other operators, and or has the lowest pecedence. I've had cases where || return needed to be changed to or return so that Devel::Cover wouldn't complain about never getting a true value for the other half of the construct.
In Section
Seekers of Perl Wisdom
|
|