[kw-pm] Hash Question

Ryan Fox foxryan at gmail.com
Mon Feb 28 14:01:33 PST 2011


I believe the standard solution is to use Storable
http://search.cpan.org/perldoc?Storable (I think it's a standard module?)

Look at freeze() and thaw() or dclone() in the perldoc there.

On Mon, Feb 28, 2011 at 4:41 PM, Robert Pike <roberthpike at yahoo.com> wrote:

> I have a complex hash that I want to make a "copy" of before manipulating
> the original hash.
> Here is what I have :
> my %tmpData = %{$aDATA};
> If I make changes to %{%aDATA} the changes are reflected in %tmpData. How
> can I copy the hash without having to loop through each element and
> assigning to the backup copy? Thanks.
>
>
> _______________________________________________
> kw-pm mailing list
> kw-pm at pm.org
> http://mail.pm.org/mailman/listinfo/kw-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kw-pm/attachments/20110228/416a2642/attachment.html>


More information about the kw-pm mailing list