--- ./toke.c~	Tue Dec 16 15:01:22 1997
+++ ./toke.c	Sun Feb  8 01:49:12 1998
@@ -1253,6 +1253,7 @@ filter_gets(register SV *sv, register FI
 #endif
 
 EXT int yychar;		/* last token */
+static char *last_proto;		/* Used recursive-safe. */
 
 int
 yylex(void)
@@ -2695,8 +2696,11 @@ yylex(void)
 		    oldoldbufptr < bufptr &&
 		    (oldoldbufptr == last_lop || oldoldbufptr == last_uni) &&
 		    /* NO SKIPSPACE BEFORE HERE! */
-		    (expect == XREF ||
-		     ((opargs[last_lop_op] >> OASHIFT)& 7) == OA_FILEREF) )
+		    (expect == XREF 
+		     || ((opargs[last_lop_op] >> OASHIFT)& 7) == OA_FILEREF
+		     || (last_lop_op == OP_ENTERSUB 
+			 && last_proto 
+			 && last_proto[last_proto[0] == ';' ? 1 : 0] == '*')) )
 		{
 		    bool immediate_paren = *s == '(';
 
@@ -2777,16 +2781,17 @@ yylex(void)
 		    /* Is there a prototype? */
 		    if (SvPOK(cv)) {
 			STRLEN len;
-			char *proto = SvPV((SV*)cv, len);
+			last_proto = SvPV((SV*)cv, len);
 			if (!len)
 			    TERM(FUNC0SUB);
-			if (strEQ(proto, "$"))
+			if (strEQ(last_proto, "$"))
 			    OPERATOR(UNIOPSUB);
-			if (*proto == '&' && *s == '{') {
+			if (*last_proto == '&' && *s == '{') {
 			    sv_setpv(subname,"__ANON__");
 			    PREBLOCK(LSTOPSUB);
 			}
-		    }
+		    } else
+			last_proto = NULL;
 		    nextval[nexttoke].opval = yylval.opval;
 		    expect = XTERM;
 		    force_next(WORD);
