In the line:
say for keys %$_ for @x;
the second for is being used as a statement modifier on another for loop, but statement modifiers are allowed only on “simple” statements (Statement Modifiers). But you can do this instead:
do { say for keys %$_ } for @x;
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Syntax error in Nested for
by Athanasius
in thread Syntax error in Nested for
by NetWallah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |