"be consistent" | |
PerlMonks |
Re: Quantum Weirdness and the Increment Operatorby hv (Prior) |
on Jun 24, 2004 at 13:32 UTC ( [id://369350]=note: print w/replies, xml ) | Need Help?? |
I think the reason it works this way is simpler than you make out. The important thing is the implementation of the preincrement operator: do { $m = 20; ++$m } does not return the value 20, rather it returns the variable $m. Therefore the sequence of operations reduces to:
Hope this helps, Hugo
In Section
Meditations
|
|