in reply to Most elegant way to dispose of duplicates using map
The FAQ How can I remove duplicate elements from a list or array? can be adapted for use here.
my %seen; @partTuples = grep { ! $seen{$_->{id}}++ } @partTuples;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Most elegant way to dispose of duplicates using map
by rashley (Scribe) on Oct 30, 2006 at 16:33 UTC | |
by rashley (Scribe) on Oct 30, 2006 at 21:18 UTC | |
by johngg (Canon) on Oct 30, 2006 at 22:28 UTC | |
by exussum0 (Vicar) on Oct 31, 2006 at 14:43 UTC | |
by johngg (Canon) on Oct 31, 2006 at 14:53 UTC | |
by rashley (Scribe) on Oct 31, 2006 at 15:00 UTC | |
by johngg (Canon) on Oct 31, 2006 at 15:43 UTC | |
by rashley (Scribe) on Oct 31, 2006 at 15:38 UTC |