in reply to post-increment/pre-increment blues

Fun exercise. So, I will take the challenge.
Now, I'll take a stab at this without doing any cheating. Then I will check my work and place it below in an 'update'.

First, my guess...

my $i = 0; # init $i and set to 0 print ++$i + 1; # answer: 1 (0 + 1) post-operation -> $i == 1 n +ow print $i++ + 1; # answer: 3 (2 + 1) post-operation -> $i == 2 n +ow print $i + $i++; # answer: 5 (2 + 3) post-operation -> $i == 3 n +ow print ++$i + ++$i; # answer: 7 (3 + 4) post-operation -> $i == 7 n +ow print ++$i + $i++ + 1; # answer: 17 (7 + 9 + 1) post-operation -> $i = += 17 now
Update:

Looks like I was way off :(

perl -Mstrict -e ' my $i = 0; print ++$i + 1,"\n"; print $i++ + 1,"\n"; print $i + $i++,"\n"; print ++$i + ++$i,"\n"; print ++$i + $i++ + 1,"\n"; ' 2 2 5 10 14
It looks like I had my pre- and post- backwards. Dumb mistake, really. I seem to have been making a lot of those lately. However, I did enjoy this little exercise.

_ _ _ _ _ _ _ _ _ _
- Jim
Insert clever comment here...