Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: P6: grammar: create a hash instead of array?

by moritz (Cardinal)
on Jun 22, 2010 at 06:15 UTC ( [id://845842]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    class H::Actions {
        # construct a hash from a list of pairs
    ...
        # construct a Str => Match pair
        method pair($/) { make ~$<key> => $<mash> };
    }
    
  2. or download this
    my @a = @($/<pairs><pair>)
    
    make %( @a».<key>».Str Z=> @a».<mash> )
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-25 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found