in reply to comparing multiple lines in an array.

I think you can start from this:
for (my $i = 0; $i < @AoA; $i ++) { for (my $j = $i+1; $j < @AoA; $j++) { # start from the following e +ntry my $tmp = join(',', $AoA[$j]); # join each inner array to a stri +ng if ($AoA[$j] =~ /$AoA[$i][0]\,(\w+)\,$AoA[$i][2]\,$AoA[$i][3]/) { # 0, 2 and 3 are equal, check 1 if (AoA[$i][1] eq $1) { # found what we needed, do something } } } }


Hotshot