- or download this
@list = qw( this that other \w+\s\w+ );
$re = join '|', @list;
$re = qr/$re/;
print "Match\n" if 'foo bar' =~ m/$re/;
- or download this
$re = join '|', map{quotemeta} @list;
- or download this
my $re;
my $str = '(foo';
...
Still running.....(?-xism:/;print"You hacked me!";/)
*****You hacked me!
Still running.....(?-xism:)