today and wondered why foo() is in scalar context. I would have thought that the construct is equivalent to($ret) ||= foo();
in which case foo() inherits the list context from the left side of the assignment.($ret) = $ret || foo();
Ideas?
In reply to Why are "a ||= b" and "a = a || b" different? by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |