Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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]
[GotToBTru]: 99% of all deaths take place within 24 hours of ingesting di-hydrogen monoxide
[GotToBTru]: time for some C8H10N4O2 for me
[ambrus]: GotToBTru: wait, you tell only the atom totals of what you want? Is that like ordering food in a restaurant by telling only the nutrient amounts you need, or
[ambrus]: like when a medieval scientist supposedly proves his priority inventing something by having previously published an anagram of a thousand letters long summary of the invention?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2016-12-06 12:59 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (104 votes). Check out past polls.