XP is just a number | |
PerlMonks |
Re: Re: Deepcopy of complex structures.by BrowserUk (Patriarch) |
on Jan 21, 2003 at 10:17 UTC ( [id://228638]=note: print w/replies, xml ) | Need Help?? |
Indeed, for simple scalars, localising a copy (or just my'ing a local copy) will take care undoing changes as the program recurses. However, if the scalar in question is a ref to an array or hash, localising the ref will undo any changes to the ref itself, but it won't undo any changes to the structure referenced. Examine what is said, not who speaks. The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
In Section
Seekers of Perl Wisdom
|
|