in reply to Finding Redundant values in arrays

This is spun off of the Extracting Unique Elements from a List section of the Perl Cookbook.
%seen = (); @unique = grep { ++$seen{$_} == 2} @test;
If you're not familiar with grep you can read all about it in perldoc -f grep but as I understand it, it returns a list consisting only of the elements in @test for which the block or expression return true. So for this snippet the block { ++$seen{$_} == 2} only returns true the second time the element has been seen.

Hope this helps
Ira

"So... What do all these little arrows mean?"
~unknown