This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[ID 19990908.014] s2p does not quote @
authorAkim Demaille <akim@epita.fr>
Wed, 8 Sep 1999 18:18:44 +0000 (20:18 +0200)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 8 Sep 1999 20:35:18 +0000 (20:35 +0000)
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;
 }