That's what I would expect, too, but if the order is undefined, we're not guaranteed to get what we expect.
For example, say that while a sub is running, it becomes apparent to Perl that the way it ordered things last time wasn't optimal (maybe the sub rarely uses its second argument, so evaluation of this argument should be deferred until it's actually used). Although unlikely, it would be legal to re-order anything whose order was undefined.
This is certainly bizarre behavior, and may well be a bug, but I've not seen mention of, or found, any solid documentation about whether the order of execution for these assignment and xor operators are defined or not, and if they are defined what the order is supposed to be.
In reply to Re: Re: Re: Re: Re: An obscure side effect?
by sgifford
in thread An obscure side effect?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |