in reply to Re^2: Why are "a ||= b" and "a = a || b" different?
in thread Why are "a ||= b" and "a = a || b" different?
I think it matters when $ret is a tied variable and there is some sort of side effect when it is read. The ||= version only evaluates it once, I believe. Esoteric? Yes.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
---|