Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Regex Search String in a Variableby roho (Bishop) |
on May 01, 2021 at 16:39 UTC ( [id://11131931]=perlquestion: print w/replies, xml ) | Need Help?? |
roho has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to replace part of a text string using a regular expression.
When I put the search string directly in the regular expression, it works (the text string is modified). When I put the search string in a variable, it does not work (the text string is not modified).
I feel like I am missing something very basic here, but I just can't see it. TIA for any suggestions.
"It's not how hard you work, it's how much you get done."
Back to
Seekers of Perl Wisdom
|
|