Not entirely sure, but (just for completeness) is your grep version supposed to sub the $A with $_ to eliminate the for loop and replace it with the grep?
So final, quickest version:
my %uniq; my @new_AOA = grep { !( $uniq{$_->[1] . '-' . $_->[3]}++ ) } @AOA;
In reply to Re^2: Optimize code | remove duplicates from AOA.
by jonc
in thread Optimize code | remove duplicates from AOA.
by ashish.kvarma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |