http://www.perlmonks.org?node_id=4395


in reply to Return a Unique Array

GrassHopper! Always read the books. In the Perl Cookbook you can find

my %seen =() ;
@unique_array = grep { ! $seen{$_}++ } @non_unique_array ;

Which makes the soul happier!