Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: looking for a perl way to build a hash

by hdb (Monsignor)
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046520]
[Corion]: Hi marto, Discipulus, choroba!
[Corion]: Seems like I chose just the right day to do a half-day recovery yesterday. Today it's snowing again, instead of the sun shining, so that's a good day to be at the office again ;)
[Discipulus]: good morning folks!
[choroba]: Boasting: brian d foy tweeting my blogpost!
[Discipulus]: eh eh choroba print it on a t-shirt for the next yapc.. ;=)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2018-03-22 09:17 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (273 votes). Check out past polls.