Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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);


Comment on Re^3: Copy of multidimensional hash
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2015-07-30 09:26 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 (270 votes), past polls