my $x = ["hello"]; my $y = ["world"]; print "We have \$x=$x and \$y=$y.\n"; print "The first element of \$x is '$x->[0]'\n"; print "The first element of \$y is '$y->[0]'\n"; print "Now swapping...\n"; $x = $x ^ $y; $y = $x ^ $y; $x = $x ^ $y; print "We have \$x=$x and \$y=$y.\n"; print "The first element of \$x is '$x->[0]'\n"; print "The first element of \$y is '$y->[0]'\n";