Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Auto Increment "magic" Inquiry

by ysth (Canon)
on Jan 05, 2007 at 10:18 UTC ( [id://593093]=note: print w/replies, xml ) Need Help??


in reply to Re: Auto Increment "magic" Inquiry
in thread Auto Increment "magic" Inquiry

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++.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://593093]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-26 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found