in reply to Get just the unique value
Use a hash and build keys from the whole entry:
my %res; for my $entry (@$data) { $res{join "|", sort %{$entry}} = $entry; } @$data = values %res; print Dumper $data;
UPDATE: Added a "sort" to become independent from order within the hash.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Get just the unique value
by Anonymous Monk on Apr 05, 2013 at 17:16 UTC | |
by hdb (Monsignor) on Apr 05, 2013 at 17:28 UTC | |
by Anonymous Monk on Apr 05, 2013 at 18:09 UTC | |
by CountOrlok (Friar) on Apr 05, 2013 at 17:28 UTC | |
by Anonymous Monk on Apr 05, 2013 at 17:45 UTC | |
by CountOrlok (Friar) on Apr 05, 2013 at 18:18 UTC | |
by hdb (Monsignor) on Apr 05, 2013 at 18:35 UTC | |
by hdb (Monsignor) on Apr 05, 2013 at 18:22 UTC | |
by Anonymous Monk on Apr 05, 2013 at 18:24 UTC | |
|