This was done for speed. XOR is a very fast operation on
some processor types (e.g., 8086). Along similar lines,
we were taught to use XOR to zero a register, because
XORing it with itself was much faster than assigning a
constant value to the register. Whether it's actually
any faster in Perl than the equivalent swap, I don't know,
but it would be faster in some assembly languages. So,
three XORs would accomplish the swap faster than the usual
three assignments, too. How many times a second does this
need to run? You might want to leave it alone, if it's a
flight control system, or at least do a benchmark before
you change it.