in reply to Eliminate Array of array duplication
For each reference, create a signature string. Two references you consider different must have different signatures. Two references you consider identical must have identical signatures. Use a hash keyed by these signatures to identify duplicates.
my %seen; @AoD = grep !$seen{ join(',', @$_) }++, @AoD;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Eliminate Array of array duplication
by Utilitarian (Vicar) on May 19, 2011 at 08:32 UTC | |
by ikegami (Patriarch) on May 19, 2011 at 10:02 UTC |