![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: Pre vs Post Incrementing variablesby JavaFan (Canon) |
on Sep 12, 2010 at 16:32 UTC ( [id://859875]=note: print w/replies, xml ) | Need Help?? |
The main reason it's declared as "undefined" is that the current implementation surprises many people, and can only be justified by exposing the implementation. Out of the two evils "having undefined behaviour" and "exposing the implementation to the language", I think the first one is the lesser.
If you really need to increment $i twice, just write it in more than one statement: Or:
In Section
Seekers of Perl Wisdom
|
|