in reply to "or die" versus "|| die"
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.
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: "or die" versus "|| die"
by davido (Cardinal) on Jun 24, 2005 at 15:44 UTC | |
by Anonymous Monk on Jun 24, 2005 at 20:30 UTC |
In Section
Seekers of Perl Wisdom