If your 'words' might contain punctuation, you can escape meta characters using quotemeta or synonymously \Q .. \E
s/\b\Q$find\E\b/$replace/g
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re^7: using hashes
by kennethk
in thread iterating hash keys?
by R56
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |