in reply to Remove unique elements from a list of lists
The idea is to create a sorted array of strings and compare those instead. Once duplicates are 'removed', you split the data back out. The key is to use a delimiter that will not show up in your data.my $temp = ...; my @compare = map { join('|',sort @$_) } sort @$temp; my %unique; @unique{@compare} = (1) x @compare; $temp = [ map {[ split /\|/, $_ ]} keys %unique ]; print Dumper $temp;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|