http://www.perlmonks.org?node_id=859875


in reply to Re: Pre vs Post Incrementing variables
in thread Pre vs Post Incrementing variables

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:

print $i + 1, $i + 1; $i += 2;
Or:
print do {$i += 1}, do {$i += 1};