in reply to Lost when exchanging values

Here's somthing you can't do in C (and shouldn't do in perl either!)

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

If you modify the values of @_ in a sub you modify the originals....

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print