Re: [perl #23210] parser error with 'print $HANDLE func(@args)'
Steve Grazzini [Mon, 4 Aug 2003 16:01:45 +0000 (12:01 -0400)]
Message-ID: <20030804200145.GB21699@grazzini.net>

Prevent the warning "Bareword found where operator expected" in
the case "print $fh foo()" where foo() is an undefined function.

p4raw-id: //depot/perl@20480

toke.c

diff --git a/toke.c b/toke.c
index 9d1fed2..adc7d26 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3559,9 +3559,7 @@ Perl_yylex(pTHX)
                    }
                }
                else {
-                   GV *gv = gv_fetchpv(tmpbuf, FALSE, SVt_PVCV);
-                   if (gv && GvCVu(gv))
-                       PL_expect = XTERM;      /* e.g. print $fh subr() */
+                   PL_expect = XTERM;          /* e.g. print $fh subr() */
                }
            }
            else if (isDIGIT(*s))