in reply to Deepcopy of complex structures.
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Deepcopy of complex structures.
by BrowserUk (Patriarch) on Jan 21, 2003 at 13:23 UTC |