No such thing as a small change | |
PerlMonks |
RE: Return a Unique Arrayby sergio (Sexton) |
on Feb 25, 2000 at 19:44 UTC ( [id://4395]=note: print w/replies, xml ) | Need Help?? |
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!
In Section
Cool Uses for Perl
|
|