$x = 'x'; $y = 'y'; print "x=$x y=$y\n"; swap($x,$y); print "x=$x y=$y\n"; sub swap { ($_[1], $_[0]) = @_ }