in reply to (Ab)?using logical operators.
in thread If / elses

No, please don't do this. I've ranted about this in the past. You cannot in general replace
$x ? $y : $z
with
$x and $y or $z
unless you can also guarantee that $y is always true. And even if you can, the next person down won't necessarily get that, and then copy it without asserting the proper precondition, and whammo both $y and $z get evaluated and then the plane crashes, hundreds of people die, and thousands of relatives sue you for being a lunkhead programmer1.

So, don't. Just don't.

-- Randal L. Schwartz, Perl hacker


1 It could happen!