allow final period in a file (not followed by a newline) to
Gurusamy Sarathy [Sat, 28 Nov 1998 19:00:15 +0000 (19:00 +0000)]
terminate format spec

p4raw-id: //depot/perl@2369

toke.c

diff --git a/toke.c b/toke.c
index fb54cee..e91fa8c 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -6148,7 +6148,7 @@ scan_formline(register char *s)
 #else
            for (t = s+1;*t == ' ' || *t == '\t' || *t == '\r'; t++) ;
 #endif
-           if (*t == '\n')
+           if (*t == '\n' || t == PL_bufend)
                break;
        }
        if (PL_in_eval && !PL_rsfp) {