Help for this page

Select Code to Download


  1. or download this
    my @pats = qw[the quick brown fox jumps over the lazy dog];
    my $str = "....";
    ...
    foreach my $pat (@pats) {
        last unless $matched &&= $str =~ /$pat/;
    }
    
  2. or download this
    my @pats = qw[the quick brown fox jumps over the lazy dog];
    my $str = "....";
    my $matched = !grep {$str !~ /$_/} @pats;