my $regex = join '|', map quotemeta, keys %g_wvr_list; my $waived = 0; for (@tmpArr){ $waived++ if m/$regex/; }