for (my $i = 0; $i <= 10; $i++){ print "Found $arrList[$i]" if (grep {$_ eq $arrList[$i]} @list_match) ## assuming that @arrList is an array of column 3 elements }