Yeah... avoid doing the processing in a destructive manner, if you can. That surely sounds like the wrong approach. If you absolutely need it, you can keep track of what nodes you have already visited by storing a stringified reference in a hash, for example.I'm writing a recursive routine that does destructive processing on a passed ref to an AoHoA... but as I return from each level of recursion, I need to 'undo' the changes made.
...
Is there something better?
In reply to Re: Deepcopy of complex structures.
by bart
in thread Deepcopy of complex structures.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |