laziness, impatience, and hubris | |
PerlMonks |
Re: deep copy of nested data structureby autark (Friar) |
on Nov 22, 2000 at 13:54 UTC ( [id://42892]=note: print w/replies, xml ) | Need Help?? |
For cloning purposes, may I suggest using either the Storable modules
dclone method
or perhaps the Clone module Back to your problem at hand, the reason you get 1 as a result of the thaw method, is because it is documented to return an array. And an array in scalar context returns the number of elements, which in your case is 1. Try something like this: @copy = thaw freeze $hashref Autark.
In Section
Seekers of Perl Wisdom
|
|