Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^3: Copy of multidimensional hash

by Neighbour (Friar)
on Jan 03, 2013 at 12:27 UTC ( #1011447=note: print w/replies, xml ) Need Help??

in reply to Re^2: Copy of multidimensional hash
in thread Copy of multidimensional hash

You could use Clone and copy the hash using my %two = %{ Clone::clone(\%one) };
Or use hashrefs all the way:
my $hr_one = { 'a' => [1, 2], 'b' => [3, 4], 'c' => [5, 6]}; my $hr_two = Clone::clone($hr_one);

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011447]
[Discipulus]: sane dots for your weekend marto!
[choroba]: My week was hectic as well, and so will be the next several ones...
[Corion]: Sane Dots Supplies - your brand manufacturer for satisfying experiences!
[choroba]: preparing the trip to Vietnam + buying a new car = enough fun
[Corion]: choroba: Yeah, that's a lot of "fun" for one week...
[Corion]: I guess I should stage some product photos for Sane Dots Supplies ;)
[marto]: I had some ideas about that Corion
[marto]: I'll send a message over the weekend maybe :P

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2017-01-20 10:13 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (174 votes). Check out past polls.