diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-09-12 19:33:06 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-09-12 19:33:06 +0000 |
commit | 7ce6e6b9b330bcb2a1d155869572dcbf97a67971 (patch) | |
tree | 600e5d6fbf0724571575f4c1e14bebc21bbc300a /toke.c | |
parent | 40814d06efea74278848431eb06d2e8edc2b07d4 (diff) | |
download | perl-7ce6e6b9b330bcb2a1d155869572dcbf97a67971.tar.gz |
Fix a syntax incompatibility introduced by the // operator.
(Note that C<print $fh //> is still a syntax error, it
wasn't with perl 5.8.0.)
p4raw-id: //depot/perl@17900
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -3554,14 +3554,9 @@ Perl_yylex(pTHX) PL_expect = XTERM; /* e.g. print $fh .3 */ else if (strchr("?-+", *s) && !isSPACE(s[1]) && s[1] != '=') PL_expect = XTERM; /* e.g. print $fh -1 */ - else if (*s == '/') { - if(s[1] == '/') { - PL_expect=XOPERATOR; - } - else { - PL_expect=XTERM; - } - } + else if (*s == '/' && !isSPACE(s[1]) && s[1] != '=' && s[1] != '/') + PL_expect = XTERM; /* e.g. print $fh /.../ + XXX except DORDOR operator */ else if (*s == '<' && s[1] == '<' && !isSPACE(s[2]) && s[2] != '=') PL_expect = XTERM; /* print $fh <<"EOF" */ } |