It is interesting to note that the trinary operator can go on the LHS of an assignment:
use warnings; use strict; my $var1 = ""; my $var0 = ""; 1 ? $var1 : $var0 = "Hello "; 0 ? $var1 : $var0 = "World\n"; print $var1.$var0;
In reply to Re: Ternary operators: a hinderance, not a help
by GrandFather
in thread Ternary operators: a hinderance, not a help
by Tanalis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |