On 10/19/06, Norbert Preining <[EMAIL PROTECTED]> wrote:

$b = (++$a) + ($a++);

I'm not sure whether C does so, but I believe that Perl does NOT
promise that auto-increments will be executed in the "expected"
left-to-right order. Thus, if a single expression includes more than
one auto-increment working on the same variable, generally you can't
be sure what Perl will do with it. As you found.

Did this come up in a real-world situation, or were you specifically
seeking to test the limits of Perl? In other words, what problem, if
any, are you trying to solve?

Cheers!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to