Note quite. That should be
$ra=Regexp::Assemble->new; $ra->add(quotemeta($_)) for qw(list of words); $re=$ra->re;
or
$re=Regexp::List->new->list2re(qw(list of words));
since you start with a list of words, not a list of patterns.
In reply to Re^2: Perl regex question
by ikegami
in thread Perl regex question
by anlamarama
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |