in reply to seek and replace for exceptional characters
You could also change your push line to:
(the \E is optional in this case, as the quoted variable is the last thing in the RE) to handle the quotemeta within the search/replace itself. See perlre for more information.push @newlines, s/\Q$A\E/$B/rg for @lines;
Update: Add clarification for my 'optional' comment.
--MidLifeXis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: seek and replace for exceptional characters
by semipro (Novice) on Sep 23, 2013 at 17:53 UTC |