分类:
2008-04-03 13:47:27
chinaunix网友2008-04-03 14:19:34
二级COPY my $hashVer = {}; my $hashV = {'A'=>[1,'a'],'B'=>[2,'b'],'C'=>[3,'c']}; #%{$hashVer} = %{$hashV}; foreach my $key (keys(%$hashV)){ @{$hashVer->{$key}} = \@{$hashV->{$key}} ; } #$hashVer = $hashV ; print Dumper($hashV); $hashVer->{'A'}[0]=5; print Dumper($hashV);