Re: disjoint copy one hash to another

[email protected] ("Jeff Peng")
Newsgroups perl.beginners
Message-ID <[email protected]>
On Tue, May 27, 2008 at 3:52 PM, Ram Prasad <[email protected]> wrote:
> When I create a copy of a hash array, the operation on the copy hash
> seems to affect the original hash
> ( when the values are reference elements )
>
> How do I avoid this ?

You need a deep copy.
Try to search on CPAN with keyword of "deep copy".
Though deep copy is used widely in other languages like python, but I
don't know why Perl mentioned it rarely.

-- 
Jeff Peng - [email protected]
Professional Squid supports in China
http://www.ChinaSquid.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.