in reply to failure to compile list eval in block
Because of the numbers (remember => is just a fat comma) this is interpreted as a hash.
eliminating the ; helps seeing what's happening
> perl -MO=Deparse { 7, 10 } __END__ +{7, 10}; # <-- a literal hash
But what do you expect a codeblock with 7,10 to do?
EDIT:
one workaround to help the parser understand your intentions is an early semicolon
perl -MO=Deparse { ; 7,10; } __END__ { '???', '???'; # <-- constants in a codeblock }
Cheers Rolf
|
|---|