This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test::Harness 2.40.
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index 7d39242..63210ae 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -477,7 +477,8 @@ method      :       METHOD
 subscripted:    star '{' expr ';' '}'        /* *main::{something} */
                         /* In this and all the hash accessors, ';' is
                          * provided by the tokeniser */
-                       { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); }
+                       { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3));
+                           PL_expect = XOPERATOR; }
        |       scalar '[' expr ']'          /* $array[$element] */
                        { $$ = newBINOP(OP_AELEM, 0, oopsAV($1), scalar($3)); }
        |       term ARROW '[' expr ']'      /* somearef->[$element] */