in reply to using quotemeta in search and replace

Why not use different delimiters on the whole replacement expression? I usually use curly braces when there are slashes in either side, e.g. s{some/path}{other/path}. See perlop under Quote-and-Quote-like-Operators for more details.

Also note that perl comes with a -p switch, which does the -n and print for you.

perl -ple 's{(.*) SYSTEM (.*)}{$1 SYSTEM "../../../../../Reporting/bin +/report.dtd">}g' 1-report.xml

Replies are listed 'Best First'.
Re^2: using quotemeta in search and replace
by greatshots (Pilgrim) on Nov 16, 2006 at 02:46 UTC