good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
the first $a++ assigns 2 to $a, the second $a++ assigns 3, and then $a = 3 + 2well, I would expect that the post increment actually postincrements: $a++ returns $a and increments after that; so the first $a++ returns 1 and now $a is 2, the second increment returns 2 and makes $a = 3 so the addition returns 1 + 2 = 3. He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life. Chady | http://chady.net/ In reply to Re: Re: Re: Auto-increment frenzy
by Chady
|
|