@list = qw( this that other \w+\s\w+ ); $re = join '|', @list; $re = qr/$re/; print "Match\n" if 'foo bar' =~ m/$re/;