in reply to Re: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
in thread Perl Idioms Explained - keys %{{map{$_=>1}@list}}
Note that this is slightly broken as is. To be entirely correct, you have to say
Of course, if you're fiddling with objects which cannot be compared for equity by stringification, it is still broken.my (%seen, $seen_undef); my @uniq = grep defined() ? !$seen{$_}++ : !$seen_undef++, @list;
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re3: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
by dragonchild (Archbishop) on Aug 04, 2003 at 20:14 UTC | |
by Aristotle (Chancellor) on Aug 04, 2003 at 20:19 UTC |
In Section
Meditations