http://www.perlmonks.org?node_id=816711


in reply to Re^2: %+ and cloning
in thread %+ and cloning

That depends on ones definition of 'best'. One could also write:
sub copy_hash { my $hr = shift // return {}; my $copy; @$copy{keys %$hr} = value %$hr; $copy; }
or just:
sub copy_hash {{%{$_[0]//{}}}}
Or without a sub:
my %copy = %+;