Help for this page

Select Code to Download


  1. or download this
    my $matched;
    my $contender = 'foo';
    my $regexPattern = '+foo';  #won't work
    eval { $matched = $contender =~ /$regexPattern/ }; warn $@ if $@;
    print "Hey, did I survive the error? Yay!\n";