diff options
author | Abhijit Menon-Sen <ams@toroid.org> | 2009-08-29 13:08:46 +0530 |
---|---|---|
committer | Abhijit Menon-Sen <ams@toroid.org> | 2009-08-29 13:08:46 +0530 |
commit | 72a2bbbfb72321e2cf05f31b10294c5597890005 (patch) | |
tree | f1a148ab0049dbce1c94b73eb9a951620733c10d /x2p | |
parent | a2c4b2d6db383103b96e4733616b17d0a3bb0bd9 (diff) | |
download | perl-72a2bbbfb72321e2cf05f31b10294c5597890005.tar.gz |
Backslash-escape /s in the target of a generated s/// expression
Fixes #68840 reported by Guglielmo Bondioni, where a2p incorrectly
translated sub(/foo/,"bar/baz") into s/foo/bar/baz/.
Diffstat (limited to 'x2p')
-rw-r--r-- | x2p/walk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/x2p/walk.c b/x2p/walk.c index ef754c59df..d3d5f9189d 100644 --- a/x2p/walk.c +++ b/x2p/walk.c @@ -845,7 +845,7 @@ sub Pick {\n\ for (t = tmp2str->str_ptr, d=tokenbuf; *t; d++,t++) { if (*t == '&') *d++ = '$' + (char)128; - else if (*t == '$') + else if (*t == '$' || *t == '/') *d++ = '\\' + (char)128; *d = *t + 128; } |