hi ,monk
Try the following code. I can't claim any credit for this.
#!/usr/bin/perl -w
@AoA=(["1","15"], ["2","5"], ["3","4"], ["3","5"], ["3","8"], ["3","5"
+], ["4","6"], ["4","5"]) ;
# print out original array
foreach $a (@AoA) {
print "[";
foreach $v (@{$a}) {
print $v,",";
}
print "],";
}
print "\n";
# now remove duplicates - see web page for explanation
%temp = ();
@list = grep ++$temp{join(",",@{$_})} < 2, @AoA;
# now print again to see amended list
foreach $a (@list) {
print "[";
foreach $v (@{$a}) {
print $v,",";
}
print "],";
Originally posted as a Categorized Answer.