Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Deepcopy of complex structures.

by BrowserUk (Patriarch)
on Jan 21, 2003 at 14:18 UTC ( [id://228682]=note: print w/replies, xml ) Need Help??


in reply to Re: Deepcopy of complex structures.
in thread Deepcopy of complex structures.

Your right. Letting the language do it is the right way to do it. What I am doing (using Clone) is to localise subtree's of the data structure into my'd vars at any given level of recursion and then allowing perl to undo this as it unwinds. See Re: Re: Deepcopy of complex structures. for somewhat more verbose (though not necessarilly clearer explanation :)

With regard an example of the structure. If I ever get the algorithm to work and if it works as well as I hope, I'm sure to post the code here.

If it doesn't I'll probably keep real quiet about it:)


Examine what is said, not who speaks.

The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.

  • Comment on Re: Re: Deepcopy of complex structures.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://228682]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found