Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Array to hash converstion

by ELISHEVA (Prior)
on Jul 15, 2009 at 06:19 UTC ( [id://780173]=note: print w/replies, xml ) Need Help??


in reply to Array to hash converstion

my @data_list = ( { key => 'a', value => 1 } , { key => 'b', value => 2 } , { key => 'c', value => 3 } ); #this line does the conversion my %hData = map { $_->{key} => $_->{value} } @data_list; print "@{[%hData]}\n";

For more information, please see map, perldsc, and perldata.

Best, beth

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-29 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found