@regexps = qw( foo bar baz ); @strings = qw( abc def ghi ); for $string (@strings) { for $regexp (@regexps) { $string =~ /$regexp/ } }