in reply to Re: $1 not "freezing" in an addition
in thread $1 not "freezing" in an addition
Perl does not guarantee what order the two operands of a binary operator will be evaluated in.
Operand evaluation order is documented and thus guaranteed for about half the ops*. And while it's not guaranteed for the other ops, it never changes (left-to-right for all ops (including **) except assignment ops).
* — Going from memory, operand evaluation order is documented for:
- && || // and or xor ?:
- = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= //= x=
- , => (in scalar context)
- .. ... (in scalar context)
In Section
Seekers of Perl Wisdom