From: Perl 5 Porters Date: Tue, 19 Mar 1996 00:25:46 +0000 (+0000) Subject: Don't double implicit loop if perl is invoked with -pn X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b084f20b80f6a49d07829dfa926905f4a8dd2220;p=p5sagit%2Fp5-mst-13.2.git Don't double implicit loop if perl is invoked with -pn --- diff --git a/toke.c b/toke.c index 7bb61c9..5a43c09 100644 --- a/toke.c +++ b/toke.c @@ -1485,8 +1485,9 @@ yylex() if (*d++ == '-') { while (d = moreswitches(d)) ; if (perldb && !oldpdb || - minus_n && !oldn || - minus_p && !oldp) + ( minus_n || minus_p ) && !(oldn || oldp) ) + /* if we have already added "LINE: while (<>) {", + we must not do it again */ { sv_setpv(linestr, ""); oldoldbufptr = oldbufptr = s = SvPVX(linestr);