Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks
I have an array of array @MyArrayOfArray, each element is an array containing x elements with textual values (in the example below x=3, but it may be bigger (<20), all arrays have the same number of elements). I need to eliminate all exact duplicates of the arrays. What is the best way to achieve this?
my @MyArrayOfArray; my $a = [ "hello", "day", "sun and fun" ]; my $b = [ 2, "okay", "may" ]; my $c = [ "hello", "day", "sun and fun" ]; push (@MyArrayOfArray, $a); push (@MyArrayOfArray, $b); push (@MyArrayOfArray, $c);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove Array Duplicates from Array of Arrays
by tybalt89 (Monsignor) on Sep 01, 2018 at 12:37 UTC | |
by Anonymous Monk on Sep 01, 2018 at 13:10 UTC | |
|
Re: Remove Array Duplicates from Array of Arrays
by Dallaylaen (Chaplain) on Sep 01, 2018 at 10:08 UTC | |
|
Re: Remove Array Duplicates from Array of Arrays
by Athanasius (Archbishop) on Sep 01, 2018 at 08:34 UTC | |
by AnomalousMonk (Archbishop) on Sep 01, 2018 at 09:13 UTC | |
|
Re: Remove Array Duplicates from Array of Arrays
by Laurent_R (Canon) on Sep 01, 2018 at 08:40 UTC |