Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Strange compiler behavior with map?

by repellent (Priest)
on Sep 05, 2011 at 08:05 UTC ( [id://924153]=note: print w/replies, xml ) Need Help??


in reply to Strange compiler behavior with map?

You need to disambiguate the curlies for the compiler. See the hashem and showem examples at Making References.

Replies are listed 'Best First'.
Re^2: Strange compiler behavior with map?
by Anonymous Monk on Sep 05, 2011 at 08:28 UTC
    Nice, I like {; natural to type (no need to press shift) and looks like a handlebar mustache
    my @f = 1 .. 3; # syntax error my %f = map { "$_" => 1 ; } @f; my %f = map {; "$_" => 1 } @f; print %f; __END__ 113121

    ;}) meat with salt ({:

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found