for my $string (@strings) { my $regex = quotemeta $string; if ( $logLines =~ /$regex/ ) {