Help for this page

Select Code to Download


  1. 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/;
    
  2. or download this
    $re = join '|', map{quotemeta} @list;
    
  3. or download this
    my $re;
    my $str = '(foo';
    ...
    Still running.....(?-xism:/;print"You hacked me!";/)
    *****You hacked me!
    Still running.....(?-xism:)