$string = "aaa ' ccc ";
$string =~ s/'/bbb/eg;

The above replaces the single-quotation mark with bbb. The result will
be:
aaa bbb ccc

How do I modify it so that the single-quotation mark is replaced with
\' (a backslash and a single-quotation mark) resulting in:
aaa \' ccc


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to