in reply to Remove Array Duplicates from Array of Arrays
Another possibility would be to stringify the subarrays and store them in a hash (with the stringified sub-arrays as keys and sub-array references as values). The hash will automatically remove duplicates, so all you need at this point is to collect the hash values and store them in a new AoA.
Update at 8:44 UTC: I had not seen it when I started to post, but the second solution above is more or less equivalent to the solution suggested by Athanasius.
|
|---|