nice solution, but you could still be doing a lot of unnecessary data copying - depending on what is stored in @array - so:
my %unique; @unique{@list} = (); @list = keys %unique;
With the cookbook method you have of course the benefit of being able to get a count of the number of occurences ...
-- Hofmator
In reply to Re: Re: Re: Removing Duplicates in an array?
by Hofmator
in thread Removing Duplicates in an array?
by pharaoh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |