Help for this page

Select Code to Download


  1. or download this
    grep { $string =~ /$_/ } @regex;
    
  2. or download this
    if ( grep { $string =~ /$_/ and return 1 } @regex ) {
        ...
    }
    
  3. or download this
    sub is_match {
        grep { $string =~ /$_/ and return 1 } @regex;
    ...
    if ( is_match() ) {
        print qq($string matched some regex);
    }