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