Help for this page

Select Code to Download


  1. or download this
    my $regex = param('foo');
    $regex = eval { qr/$regex/ };
    if ($@) { "it was bad... handle it" }
    
  2. or download this
    my $regex = param('foo');
    $regex = eval { qr/$regex/ } or do {
      # handle failure
    };