in reply to Re^2: Regular expression "replace string interpolation" problem
in thread Regular expression "replace string interpolation" problem
You want to produce the codeOr how to embed " in the output - but that's not a biggie right now.
so"$1 \"Perl\""
my $replace = '"$1 \\"Perl\\""'; # Produces: "$1 \"Perl\"" s/$match/eval $replace/e
Technically, the slashes don't need to be doubled since single quotes are forgiving when it's unambiguous.
|
---|
In Section
Seekers of Perl Wisdom