print $a++; #prints $a and then increments $a (hence prints 0) print ++$a; #increment $a and THEN print $a (hence prints 1)