in reply to Re: finding duplicates in an array
in thread finding duplicates in an array

If the order of the elements in each (x, y) pair really doesn't matter, then sorting them should result in data that can then be processed using the techniques in finding duplicates in an array. In other words, make both (1, 4) and (4, 1) into the same pair.

Was that enough of a hint, or do you need an example?

Update: I couldn't resist.

my @aoa = ( [1,4], [4,1] ); my @sorted = map { [ sort { $a <=> $b } @$_ ] } @aoa;