Help for this page

Select Code to Download


  1. or download this
    use strict; 
    use warnings;
    ...
    (my $quoted = $str) =~ s/\"/\\\"/g;
    
    print "$str\n$quoted\n";
    
  2. or download this
    A string with a "double quoted" string in it
    A string with a \"double quoted\" string in it