$x ||= 42 is read as "if $x is false (empty string, 0 or undef) store 42 into $x". This construct has always had problems when used to assign a default value (what if you want $x to be zero) that will soon be solved by the "defined-or" operator, //, arriving soon in perl 5.10.0.
In reply to Re: Or, Or, Equals Zero, $x ||= 0
by FunkyMonk
in thread Or, Or, Equals Zero, $x ||= 0
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |