@regex = ( 'foo' 'b[a-z]' ); $string = 'foo'; my $matched = 0; foreach $test ( @regex ) { $matched++ if ($string =~ m/$test/); } if ($matched) { ... #### if ( grep($regex, @strings) { ... #### if ( map(string =~ /$_/, @regex) ) { ...