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:
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);
|
---|
In Section
Seekers of Perl Wisdom