Re^2: Quantum Weirdness and the Increment Operatorby barrachois (Pilgrim)
|on Jun 25, 2004 at 02:54 UTC||Need Help??|
Part of what surprised me was that "return" gave me back a copy, so my "noop" subroutine should actually be called "copy".
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.