To improve upon this, what's a good idiom for doing the equivilent of:my $goodnames= join ('|', map { quotemeta} (@names)); # do that once # later... s/stuff (?:$goodnames) stuff/o # each time I need that
in one statement?my $goodnames= join ('|', map { quotemeta} (@names)); $goodnames= qr/$goodnames/;
In reply to Good Idiom for Matching List? by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |