Perl Monk, Perl Meditation | |
PerlMonks |
Re: How do I find if an array has duplicate elements, if so discard it?by hossman (Prior) |
on May 30, 2003 at 00:22 UTC ( [id://261732]=note: print w/replies, xml ) | Need Help?? |
A one-liner from "Effective Perl Programming"... @uniq = sort keys %{ { map { $_, 1 } @list } };
In Section
Seekers of Perl Wisdom
|
|