JTomb has asked for the wisdom of the Perl Monks concerning the following question:
$puid="fmt/412"; $file_path="C:\Service Record.docx";
I'm trying to substitute plain text for the variables as in:
$cont=~s/FilePath/\Q$file_path\E/g; $cont=~s/PUID/\Q$puid\E/g;
Problem is I end up with:
fmt\/412
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with variable that contains certain characters in replacement side of regex substitution.
by choroba (Cardinal) on May 11, 2013 at 01:35 UTC | |
by JTomb (Initiate) on May 11, 2013 at 19:44 UTC |