Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: looking for a perl way to build a hash

by hdb (Prior)
on Jul 26, 2013 at 14:06 UTC ( #1046520=note: print w/ replies, xml ) Need Help??


in reply to looking for a perl way to build a hash

use strict; use warnings; use Data::Dumper; use List::MoreUtils qw(mesh); my $str1="a,b,c"; my $str2="1,2,3"; my %hash = mesh @{[ split/,/,$str1 ]}, @{[ split/,/,$str2 ]}; print Dumper \%hash;


Comment on Re: looking for a perl way to build a hash
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-07-06 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls