Let's say you have a variable $A and you do this:
$A = 5; $B = $A++; print $A; # prints out 6. $B is 5
$A = 5; $B = ++$A; print $A; # prints out 6. $B is 6
$A = 5; $B = $A*2; print $A; # prints out 5. $B is 10
$A = 5; $B = $A+1; print $A; # prints out 5. $B is 6
Because ++ changes the original AFTER the operation, and mutiplication just returns the result, without modifying the original.
In reply to Re^3: map confusion
by FreeBeerReekingMonk
in thread map confusion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |