Thanks, this is of interest.
I think if I had known benchmarks would be run, I would have hashed instead of grepping.
my %sought = map {$_ => 1} @prims;and later
if ($sought{$word})And then there's List::MoreUtils::any, which would at least quit on the first match instead of checking the rest of the list.
In reply to Re^4: Pattern match array
by Narveson
in thread Pattern match array
by aennen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |