in reply to Re^5: Short form (ternary) if else
in thread Short form (ternary) if else
Do you know why $x becomes 0?ken@ganymede: ~/tmp $ perl -Mstrict -Mwarnings -E 'my $x; 1 ? $x=1 : $x=0; say $x;' 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Short form (ternary) if else
by wrog (Friar) on Feb 08, 2012 at 23:32 UTC | |
by Riales (Hermit) on Feb 08, 2012 at 23:43 UTC | |
|
Re^7: Short form (ternary) if else
by kcott (Archbishop) on Feb 08, 2012 at 23:59 UTC | |
by gg48gg (Sexton) on Feb 09, 2012 at 00:05 UTC |