http://qs1969.pair.com?node_id=330408


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.