print ++$i + 1; # prints 2, increment and than add 1 print $i++ + 1; # prints 2, $i==1, take the old $i (1) and add 1, the increment happens after the sum was calculated print $i + $i++; # prints 5, $i==2, the increments happens first and we get 2+3 print ++$i + ++$i; # prints 10, $i==3, the pre increment is done twice because it's precedens on '+' and than we get 5+5 print ++$i + $i++ + 1; # prints 14, $i==5, didn't figure out yet