[ The OP silently updated his question. This post is now obsolete. ]
Result:
foreach(loop through each $word in search phrase) { $answer =~ s{\Q$word\E}{<b><u>$word</u></b>}g; }
Read perlop for details.
In reply to Re: Perl regex
by ikegami
in thread Perl regex
by axl163
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |