Something like this I guess:
my @list = qw(fish bread eggs eggs fish butter); my %check; $check{$_}++ foreach @list; my @unique = grep { $check{$_} == 1 } keys %check;
But I'm not much of a golfer :)
--Perl Training in the UK <http://www.iterative-software.com>
In reply to Re: Re: (jeffa) Re: Removing Duplicates in an array?
by davorg
in thread Removing Duplicates in an array?
by pharaoh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |