Help for this page

Select Code to Download


  1. or download this
    my @pats = /one/, /two/, /three/;
    say "matched" if $string ~~ any @pats;
    
  2. or download this
    my $any = any @pats;
    $string ~~ $any;
    
  3. or download this
    given $string {
        when $any { ... } # won't work if $any is a junction
    }