go ahead... be a heretic | |
PerlMonks |
Re: Copying an Array of Hashesby Masem (Monsignor) |
on Jul 04, 2001 at 01:42 UTC ( [id://93704]=note: print w/replies, xml ) | Need Help?? |
The best way to copy any complex data structure is to use something like the Clone module; it will make a complete copy of all nested data items for you. Mind you, if you are trying to make a new array but with the same references to hashes, you'll have to do a element-by-element copy, as Clone will try to make copies of the hashes instead.
In Section
Seekers of Perl Wisdom
|
|