Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2016-12-10 14:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (163 votes). Check out past polls.