Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4:How to Map a scalar to a key that is an array?

by jdporter (Canon)
on Aug 01, 2019 at 21:56 UTC ( #11103741=note: print w/replies, xml ) Need Help??


in reply to Re^3: How to Map a scalar to a key that is an array?
in thread How to Map a scalar to a key that is an array?

my %data = do { local $/ = ''; map { chomp; split /\n/, $_, 2 } <> };
my %data = map /^(.*?)\n(.*)\n/s, do { local $/ = ''; <> };

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2019-11-19 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (95 votes). Check out past polls.

    Notices?