Here's a snippet of code to verify my assumption:
and it printsmy $a; ($a) = ($a) || foo(); ($a) ||= foo(); sub foo { wantarray ? print("list\n") : print("scalar\n"); return 0; }
list scalar
In reply to Re^2: Why are "a ||= b" and "a = a || b" different?
by saintmike
in thread Why are "a ||= b" and "a = a || b" different?
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |