Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: %+ and cloning

by JavaFan (Canon)
on Jan 11, 2010 at 12:40 UTC ( #816711=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub copy_hash {
        my $hr = shift // return {};
    ...
        @$copy{keys %$hr} = value %$hr;
        $copy;
    }
    
  2. or download this
    sub copy_hash {{%{$_[0]//{}}}}
    
  3. or download this
    my %copy = %+;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-12-26 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls