Help for this page

Select Code to Download


  1. or download this
    my $string = '"I have a 15" latter and a 6" foot arm."';
    substr( $string, 1, -1 ) =~ s["]["]g;
    print $string;
    
    "I have a 15" latter and a 6" foot arm."
    
  2. or download this
    my $string = '"I have a 15" latter and a 6" foot arm."';
    $string =~ s[(?<=.)"(?=.)][&quot;]g;
    print $string;
    
    "I have a 15&quot; latter and a 6&quot; foot arm."