Clean way to copy a Perl hash through Perl 5 API
Posted on 2004-08-26
I have a variable HV *myHash - which may be a simple Perl hash, an object or a tied variable. I want to make a copy of it (its variables) into a new variable myHash2, and destroy it afterwards.
I just need two functions that are proven to work fine (and are very safe) for copying/deleting. Clean/short solutions would really be appreciated.