in reply to (Ab)?using logical operators.
in thread If / elses
with$x ? $y : $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.$x and $y or $z
So, don't. Just don't.
-- Randal L. Schwartz, Perl hacker
|
|---|