my @phrases = <foo bar>; print join "|", map { "\\s$_\\s" } map { quotemeta } @phrases;' __END__ \sfoo\s|\sbar\s
The regex looks fine to me - but without knowing what you match against it's impossible to tell if the regex is appropriate in your case.
In reply to Re: map function use
by moritz
in thread map function use
by newbio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |