in reply to Efficient Comparison of Array elements

I think Set::Array will do the job. NOTE: UNTESTED CODE (will be updated)
use Set::Array; my $sao1 = Set::Array->new(1, 2, 3, 4); my $sao2 = Set::Array->new(2, 4, 6, 8); my @common = $sao1->intersection($sao2); my @u_one = $sao1->difference($sao2); my @u_two = $sao2->difference($sao1);
Update: Code updated, and tested.

--
"To err is human, but to really foul things up you need a computer." --Paul Ehrlich