The padsv op pushes $x (not a copy) onto the perl stack; $x is currently an integer value (IV) with value 5: (-e:1) padsv($x) => IV(5) $x is pushed onto the stack again: (-e:1) padsv($x) => IV(5) IV(5) preinc increments the variable $x; note that both values on the stack have now incremented (because they are both $x, not copies) (-e:1) preinc => IV(6) IV(6) the add op takes the top two values on the stack and replaces them with a new value: (-e:1) add => IV(12) push $x again. Since it was preinc()ed earlier, it now has the value 6: (-e:1) padsv($x) => IV(12) IV(6) postinc takes the variable $x off the stack, makes a copy and pushes that copy back on the stack, then increments $x. If we had any other direct $x's on the stack (which we don't), their values would appear incremented: (-e:1) postinc => IV(12) IV(6) the final add does the obvious thing. (-e:1) add => IV(18)