Don't ask to ask, just ask | |
PerlMonks |
Re^2: Auto Increment "magic" Inquiryby ysth (Canon) |
on Jan 05, 2007 at 10:18 UTC ( [id://593093]=note: print w/replies, xml ) | Need Help?? |
After writing this, I realize that it makes no difference that ++$i returns an alias. But I'm too lazy to rewrite the whole thing. The main point is the order in which you evaluate the arguments to the addition operation in those big expressions.It does make a difference, but not in the example you show; to see a difference, you need to have something modify $i before the alias is used, like ++$i + $i++.
In Section
Seekers of Perl Wisdom
|
|