Allow @+ and @- to be doublequoted, from Simon Cozens.
Jarkko Hietaniemi [Fri, 13 Oct 2000 18:40:48 +0000 (18:40 +0000)]
p4raw-id: //depot/perl@7224

toke.c

diff --git a/toke.c b/toke.c
index 4b65d62..b3c6674 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1305,9 +1305,11 @@ S_scan_const(pTHX_ char *start)
                *d++ = *s++;
        }
 
-       /* check for embedded arrays (@foo, @:foo, @'foo, @{foo}, @$foo) */
+       /* check for embedded arrays
+          (@foo, @:foo, @'foo, @{foo}, @$foo, @+, @-)
+          */
        else if (*s == '@' && s[1]
-                && (isALNUM_lazy_if(s+1,UTF) || strchr(":'{$", s[1])))
+                && (isALNUM_lazy_if(s+1,UTF) || strchr(":'{$+-", s[1])))
            break;
 
        /* check for embedded scalars.  only stop if we're sure it's a