Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: failure to compile list eval in block

by ikegami (Pope)
on Dec 16, 2012 at 13:45 UTC ( #1009061=note: print w/ replies, xml ) Need Help??


in reply to failure to compile list eval in block

The usual disambiguators:

{; ... } # Block +{ ... } # Hash constructor

For example,

>perl -ce"{ 1, 2; }" syntax error at -e line 1, near "; }" -e had compilation errors. >perl -ce"{; 1, 2; }" -e syntax OK >perl -ce"map { f() }, @a" syntax error at -e line 1, near "}," -e had compilation errors. >perl -ce"map +{ f() }, @a" -e syntax OK


Comment on Re: failure to compile list eval in block
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009061]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-07-07 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls