in reply to Re: Copy of an anonymous hash?
in thread Copy of an anonymous hash?
That works, but only if the hash contains simple scalars. If it contains any references, the reference will be copied, so you'll have two references to the same thingy. If that matters, I recommend using the Storable module and its dclone function.
This won't solve the problem of references to items outside the structure, but that's not usually a problem that needs solving anyway.
In Section
Seekers of Perl Wisdom