But the question is tricky because details are important if blessed objects ° are involved or speed matters.
In the end you need to know what you really want.
°) To be more specific how do you clone an arbitrary object "correctly" if the class doesn't provide a clone method?
And what is "correctly" and "good enough" ? :)
For instance an array @bus containing objects of persons sitting in a bus like say $Rolf and $MrSnrub.
After copying the bus, it'll depend on the application if you really want to clone the persons too.
I'd consider creating a clone of person highly unwanted. Especially identity theft of $Rolf. ;)
If I'm the passenger in two different busses, you'd want to update personal information like addresses only once...
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^4: How to create a new array with the same name as an existing one in a loop? (Updated)
by LanX
in thread How to create a new array with the same name as an existing one in a loop?
by MrSnrub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |