in reply to REł: if-else vs. tertiary effieciency?
in thread if-else vs. tertiary effieciency?
The ternary operator here has a higher precedence than the print that works as a list operator, so Perl does the right thing.$ perl -MO=Deparse,-p -e'print $var ? "yes" : "no";' print(($var ? 'yes' : 'no')); -e syntax OK
Makeshifts last the longest.
|
|---|