I'm affraid no.
Givessub foo { wantarray or die "this function is called in list context in all ex +amples"; "alpha", "beta", "gamma"; } $ret = undef; ($ret) = $ret || foo(); print "parenthetical: $ret\n"; $ret = undef; $ret ||= (foo())[0]; print "zero: $ret\n"; $ret = undef; $ret = (foo())[-1]; print "minus one: $ret\n";
parenthetical: alpha zero: alpha minus one: gamma
In reply to Re^3: Why are "a ||= b" and "a = a || b" different?
by ambrus
in thread Why are "a ||= b" and "a = a || b" different?
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |