Curlies ambiguity. In places where blocks and expressions are both valid, curlies are normally interpreted as blocks. However, when the code looks like hash construction, the curlies are interpreted as a hash constructor instead.
>perl -ce"map{ qq{@{ $_->[ 0 ] }} => $_ } @a" syntax error at -e line 1, next char @ -e had compilation errors. >perl -ce"map{; qq{@{ $_->[ 0 ] }} => $_ } @a" -e syntax OK
In reply to Re: Syntax error that I don't understand?
by ikegami
in thread Syntax error that I don't understand?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |