in reply to ||= (poorly documented?)
Printsperl -e "my $shoo = 50; $shoo ||= 100; print $shoo;"
Should be the same as,50
If you scroll down in perlop you'll see that style used to describe what // does, so they appear to be equivalent.perl -e "$shoo=50; $shoo = ($shoo)?50 : 100;print $shoo;"
Celebrate Intellectual Diversity
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: ||= (poorly documented?)
by frozenwithjoy (Priest) on Jul 09, 2012 at 06:47 UTC |