This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123893] Fix hang with "@{"
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index 9e0575c..4910b6b 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -4624,7 +4624,8 @@ Perl_yylex(pTHX)
     case 26:
        goto fake_eof;                  /* emulate EOF on ^D or ^Z */
     case 0:
-       if (!PL_rsfp && (!PL_parser->filtered || s+1 < PL_bufend)) {
+       if ((!PL_rsfp || PL_lex_inwhat)
+        && (!PL_parser->filtered || s+1 < PL_bufend)) {
            PL_last_uni = 0;
            PL_last_lop = 0;
            if (PL_lex_brackets &&