Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Copy of multidimensional hash

by muba (Priest)
on Jan 03, 2013 at 10:38 UTC ( [id://1011436]=note: print w/replies, xml ) Need Help??

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.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1011436]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-24 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found