Dear Monks
Certain purveyors of half truths have led me to believe that the "? :" syntax and the "if then else" syntax spring from the same goodly source. yet i say one is a calumny of the very perl itself. to wit :-
my $a = 'a'; my $b = 'b'; 1 ? $a = 2 : $b = 'x'; print "a is $a\n"; print "b is $b\n";
outputs
a is x b is b
In reply to ternary conditional help by opaltoot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |