use strict; use warnings; my $str = 'A string with a "double quoted" string in it'; (my $quoted = $str) =~ s/\"/\\\"/g; print "$str\n$quoted\n";
Prints:
A string with a "double quoted" string in it A string with a \"double quoted\" string in it
Where's the problem?
In reply to Re: I am having a problem with search and replace regarding "
by GrandFather
in thread I am having a problem with search and replace regarding "
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |