my $data= join("\t", map { /(\[\d*\])/ } @dataArray); my $notfound=0; foreach (@arrayOfSearchStrings) { if (not $data=~/\Q$_\E/) { $notfound=1; print "$_ not included\n"; last; } } print "All there\n" unless $notfound;