in reply to map syntax error -- weird
It is a well-known limitation of the perl parser.
It decides that this: map { ... => ... } ... is a map returning a hashref; and then the absence of a comma means if doesn't have enough arguments.
Fix it by giving it a hint that the curlies are a code block like this: map {; "x" => $y } qw(1 2 3);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: map syntax error -- weird
by hdb (Monsignor) on Mar 22, 2013 at 10:38 UTC | |
by LanX (Saint) on Mar 22, 2013 at 10:54 UTC | |
by BrowserUk (Patriarch) on Mar 22, 2013 at 10:54 UTC | |
|
Re^2: map syntax error -- weird
by tobyink (Canon) on Mar 22, 2013 at 22:38 UTC | |
by ikegami (Patriarch) on Mar 24, 2013 at 07:08 UTC |