in reply to Re: Error with doublequotes in map
in thread Error with doublequotes in map
Yup, it's thinking it's the LIST form with a hashref missing a trailing comma before the empty parens rather than BLOCK. If you parenthesize things it'll behave as well.
$ perl -MO=Deparse,-p -Mstrict -Mwarnings -e 'map{("$_" => 1)} ();' use warnings; use strict 'refs'; map({("$_", 1);} ()); -e syntax OK
Strange and surprising, yes. "Bug", hrmmm . . . I'd say more ambiguous corner of the grammar.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Error with doublequotes in map
by bart (Canon) on Feb 12, 2007 at 21:05 UTC | |
|
Re^3: Error with doublequotes in map
by mreece (Friar) on Feb 12, 2007 at 23:06 UTC |