This is a variant on an old assembly and 'C' trick that seems to work under Perl (at least, 5.005_03).
my $x = 123; my $y = 666; $x ^= $y ^= $x ^= $y;
It swaps the two values without using an intermediate variable. Now I know that can be done under Perl other ways, but it might make a cool little hack for a JAPH-type person (which is *very* not-me).
For a collection of cute C tricks that someone could port to Perl, see Steve's 'Cute Code' Collection
--ChrisIn reply to Potentially useful code fragment for you JAPHer's by jcwren
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |