Best way, period, is:
in reply to Recursive copier
use Storable qw(dclone);
# Deep (recursive) cloning
$cloneref = dclone($ref);
Keeping in mind it is shipped for free with any fairly modern
perl installation (INST_FILE /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Storable.pm)
and is one of the more regularly "use"d modules in other modules. That means the perl-porters
themselves have taken a modicum of interest in seeing that
it is correct and complete.
The likelyhood is, you already have Storable installed!
$you = new YOU;
honk() if $you->love(perl)