<?xml version="1.0" encoding="windows-1252"?>
<node id="89462" title="Re: Recursive copier" created="2001-06-18 21:26:31" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="20087">
extremely</author>
<data>
<field name="doctext">
Best way, period, is:
&lt;code&gt;use Storable qw(dclone);
# Deep (recursive) cloning
$cloneref = dclone($ref);
&lt;/code&gt;
&lt;p&gt;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.
&lt;p&gt;The likelyhood is, you already have [CPAN://Storable] installed!
&lt;p&gt;&lt;i&gt;-- &lt;br&gt;
$you = new YOU;&lt;br&gt;
honk() if $you-&gt;love(perl)&lt;/i&gt;</field>
<field name="root_node">
89365</field>
<field name="parent_node">
89365</field>
</data>
</node>
