in reply to Search/Replace action using "."
To create a regex pattern that matches a string of text, use quotemeta.
my $OldVerPat = quotemeta($OldVer); s/$OldVerPat/$NewVer/
quotemeta can be called via \Q..\E.
s/\Q$OldVer\E/$NewVer/
The \E can be ommitted since it's at the end of the pattern.
s/\Q$OldVer\E/$NewVer/
|
|---|