Help for this page

Select Code to Download


  1. or download this
    for (keys %one) {
        $two{$_}[0] = $one{$_}[0];
        $two{$_}[1] = $one{$_}[1];
    }
    
  2. or download this
    for my $k (keys %one) {
        $two{$k}[$_] = $one{$k}[$_] for 0..scalar( @{$one{$k}} );
    }
    
  3. or download this
    for my $k (keys %one) {
        $two{$k} = [ @{$one{$k}} ];
    }
    
  4. 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.