<?xml version="1.0" encoding="windows-1252"?>
<node id="816710" title="Re^2: %+ and cloning" created="2010-01-11 07:30:16" updated="2010-01-11 07:30:16">
<type id="11">
note</type>
<author id="89299">
PetaMem</author>
<data>
<field name="doctext">
&lt;p&gt;Thanks for your insight.&lt;/p&gt;

So I went back to twig technology and copied the hash via

&lt;code&gt;
sub copy_hash {
    my $hr = shift // return {}; # get hash to copy or return empty hashref if not given

    my %copy = ();

    while (my ($k, $v) = each %{$hr}) {
        $copy{$k} = $v;
    }

    return \%copy;
}
&lt;/code&gt;

&lt;p&gt;Which works. So this is it? Best way to go?&lt;/p&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-89299"&gt;
&lt;p&gt;&lt;font size=-1&gt;Bye&lt;br&gt;
&amp;nbsp;PetaMem&lt;/font&gt; &amp;nbsp; &lt;font size=-2&gt; &amp;nbsp; All Perl: &amp;nbsp; &lt;a href="http://www.petamem.com"&gt;MT, NLP, NLU&lt;/a&gt;&lt;/font&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
816700</field>
<field name="parent_node">
816708</field>
</data>
</node>
