This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
allow perlbug -ok when STDIN it not a tty
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index fa0e0f5..a1a1f0d 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -153,6 +153,9 @@ sideff      :       error
                        { $$ = newLOOPOP(OPf_PARENS, 1, scalar($3), $1); }
        |       expr UNTIL iexpr
                        { $$ = newLOOPOP(OPf_PARENS, 1, $3, $1);}
+       |       expr FOR expr
+                       { $$ = newFOROP(0, Nullch, $2,
+                                       Nullop, $3, $1, Nullop); }
        ;
 
 else   :       /* NULL */
@@ -291,7 +294,7 @@ startformsub:       /* NULL */      /* start a format subroutine scope */
 subname        :       WORD    { char *name = SvPV(((SVOP*)$1)->op_sv, na);
                          if (strEQ(name, "BEGIN") || strEQ(name, "END")
                              || strEQ(name, "INIT"))
-                         { CvUNIQUE_on(compcv); subline = -subline; }
+                             CvUNIQUE_on(compcv);
                          $$ = $1; }
        ;
 
@@ -439,7 +442,7 @@ term        :       term ASSIGNOP term
        |       scalar  %prec '('
                        { $$ = $1; }
        |       star '{' expr ';' '}'
-                       { $$ = newBINOP(OP_GELEM, 0, newGVREF(0,$1), $3); }
+                       { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); }
        |       star    %prec '('
                        { $$ = $1; }
        |       scalar '[' expr ']'     %prec '('