in reply to Re^8: eval order of args to a sub
in thread eval order of args to a sub
+ - . have "left associativity", so the operands are evaluated in that order; after evaluating the operands for an operation each operation takes place in the order which satisfies said associativity.
People might assume that, but it's just not on the page. The snippet we both quoted clearly confines itself to breaking operand-binding ties between adjacent identical operators. On the issue of when to evaluate each operand, the Camel speaketh not.
For that matter, you don't even know for sure that foo() will always be evaluated before moo(). Perl could run those functions left-to-right, right-to-left, or all at the same time and still be within spec. It just has to apply the operators in a certain order and finish up before beginning the next statement.
|
|---|