Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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);

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 browsing the Monastery: (5)
As of 2016-06-26 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (327 votes). Check out past polls.