in reply to How to swap scalar values without copies
Is this not what you need?
$a=\$x; $b=\$y; print "$a $b\n" ($a,$b)=($b,$a); print "$a $b\n";
update: changed $a and $b to references.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: How to swap scalar values without copies
by Anonymous Monk on Feb 19, 2004 at 23:57 UTC | |
by Roger (Parson) on Feb 20, 2004 at 00:24 UTC | |
by Anonymous Monk on Feb 20, 2004 at 00:43 UTC | |
Re: Re: How to swap scalar values without copies
by Anonymous Monk on Feb 20, 2004 at 00:06 UTC | |
by hardburn (Abbot) on Feb 20, 2004 at 00:16 UTC | |
by Anonymous Monk on Feb 20, 2004 at 02:04 UTC | |
by Anonymous Monk on Feb 20, 2004 at 02:22 UTC |
In Section
Seekers of Perl Wisdom