Perhaps you want something like this:
my $string = '(?<=\s)(' . join( '|', map "\Q$_", @phrases ) . ')(?=\s) +'; $sentence =~ s/$string/#$1#/g;
In reply to Re: map function use
by jwkrahn
in thread map function use
by newbio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |