[ID 19990908.014] s2p does not quote @
Akim Demaille [Wed, 8 Sep 1999 18:18:44 +0000 (20:18 +0200)]
Message-Id: <m11OkQm-003A4IC@beyrouth.lrde.epita.fr>

p4raw-id: //depot/perl@4107

x2p/s2p.PL

index 2f617e7..be092c2 100644 (file)
@@ -552,6 +552,11 @@ EOT
                        substr($_,$i-1,1) = '$';
                    }
                }
+               elsif ($c eq '@') {
+                   substr($_, $i, 0) = '\\';
+                   $i++;
+                   $len++;
+               }
                elsif ($c eq '&' && $repl) {
                    substr($_, $i, 0) = '$';
                    $i++;
@@ -797,6 +802,7 @@ sub fetchpat {
        }
     }
     $addr =~ s/\t/\\t/g;
+    $addr =~ s/\@/\\@/g;
     &simplify($addr);
     $addr;
 }