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 481a2cc..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 */
@@ -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 '('