summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index f2f8fa5e5b..e7e217473e 100644
--- a/toke.c
+++ b/toke.c
@@ -2797,8 +2797,10 @@ Perl_yylex(pTHX)
newSVpvn(s, len)));
}
s = skipspace(d);
- while (*s == ',')
+ if (*s == ':' && s[1] != ':')
s = skipspace(s+1);
+ else if (s == d)
+ break; /* require real whitespace or :'s */
}
tmp = (PL_expect == XOPERATOR ? '=' : '{'); /*'}(' for vi */
if (*s != ';' && *s != tmp && (tmp != '=' || *s != ')')) {