Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: $1 not "freezing" in an addition

by ikegami (Pope)
on Dec 16, 2012 at 14:13 UTC ( #1009066=note: print w/ replies, xml ) Need Help??


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)


Comment on Re^2: $1 not "freezing" in an addition
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009066]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (15)
As of 2015-07-28 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls