Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: map problem

by morgon (Curate)
on Mar 09, 2012 at 11:01 UTC ( #958678=note: print w/replies, xml ) Need Help??


in reply to Re: map problem
in thread map problem

Ok, but why is it neccessary only in the second case?

Replies are listed 'Best First'.
Re^3: map problem
by moritz (Cardinal) on Mar 09, 2012 at 11:05 UTC

    The decision to parse an opening curly bracket as a block or a hash ref is really just a heuristic. When the parser sees a string quote, it decides in favor of the hash ref, whereas a variable makes it assume a block.

    Or put differently, the parser cheats as hell, and sometimes that backfires. But not always.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://958678]
help
Chatterbox?
[Tanktalus]: it's all the same process, and, IIRC, the same mechanized object.
[Tanktalus]: hmm, no, the mech object for posting isn't the same as reading, but it's the same as the logging in one.
[Tanktalus]: I really need to rewrite this whole thing anyway. :)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2018-07-15 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (326 votes). Check out past polls.

    Notices?