Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Parsing data into an Array of Hashes

by Abigail-II (Bishop)
on Sep 18, 2003 at 13:14 UTC ( #292379=note: print w/replies, xml ) Need Help??


in reply to Parsing data into an Array of Hashes

As a one-liner:
my @data = map {chomp; +{/([^=]+)=([^,]+),?/g}} <>;

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://292379]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2016-12-11 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.