Hi broquaint,
or, to keep the order that the items are inserted (ie. the order in which the first instance of a value is encountered)
my %seen; @uniq = grep ! $seen{$_}++, @list;
cheers
thinker
In reply to Re: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
by thinker
in thread Perl Idioms Explained - keys %{{map{$_=>1}@list}}
by broquaint
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |