|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re^2: Quantum Weirdness and the Increment Operatorby barrachois (Pilgrim) |
| on Jun 24, 2004 at 22:54 UTC ( [id://369539]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Yes. Part of what surprised me was that "return" gave me back a copy, so my "noop" subroutine should actually be called "copy". Update The plot thickens. I see over on Aliasing and return, how does return work? a discussion of just this issue, with a suggestion by japhy to use lvalue subs. A quick test shows that one can indeed return $x itself this way - but the increment expression is still altered by a call to this kind of subroutine, too. So I guess the copy that "return" makes isn't the whole issue.
In Section
Meditations
|
|
||||||||||||||||||||||||