in reply to How to find and remove duplicate elements from an array?

{ my %hash; $hash{@A} = (); @A = keys %hash; }

Originally posted as a Categorized Answer.