- or download this
for (keys %one) {
$two{$_}[0] = $one{$_}[0];
$two{$_}[1] = $one{$_}[1];
}
- or download this
for my $k (keys %one) {
$two{$k}[$_] = $one{$k}[$_] for 0..scalar( @{$one{$k}} );
}
- or download this
for my $k (keys %one) {
$two{$k} = [ @{$one{$k}} ];
}
- or download this
use Storable qw(dclone);
...
...
# So we'll have to put in \%one (not %
+one)
# and then we have to dereference ( %{
+...} )
# what comes out.