Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Array to hash converstion

by AnomalousMonk (Archbishop)
on Jul 15, 2009 at 06:13 UTC ( [id://780172]=note: print w/replies, xml ) Need Help??


in reply to Re: Array to hash converstion
in thread Array to hash converstion

my %newhash = map {{ $_->{key} } = >$_->{value} } @data_list;
>perl -wMstrict -MData::Dumper -le "my @d_pairs = ( { key => 'foo', value => 'bar' }, { key => 'fee', value => 'fie' }, ); my %hash = map { $_->{key} => $_->{value} } @d_pairs; print Dumper \%hash; " $VAR1 = { 'fee' => 'fie', 'foo' => 'bar' };

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found