Subject: | for-loop in a parenthesized block-map |
There seems to be an error if we use a 'for' loop inside a block-map which has parentheses around it.
Example:
map(
{
foreach my $item ('0', '1'){print $item}
} qw(a b c)
);
The error is:
3: foreach my $item ('0', '1'){print $item}
----- ^
found ( where operator expected (previous token underlined)
Do you mean '$item->(' ?
3: syntax error at ') {', didn't see one of: case elsif for foreach given if switch unless until when while