Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046520]
help
Chatterbox?
[james28909]: oops s/sunday - monday/sunday - saturday/
[james28909]: my mind is blown haha
[james28909]: hmm, i haz idea!

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-04-29 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.