http://qs1969.pair.com?node_id=373505


in reply to Re: Pass by value acts like pass by reference
in thread Pass by value acts like pass by reference

When you flatten a hash you are getting a shallow copy of the hash, not a deep copy. To get a deep copy you need to use some form of serialization mechanism to do it. Storable will probably be your best bet in terms of speed and memory consumption. Of course,it may be a lot easier to just change your algorithm to not corrupt the original arrays....


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


Replies are listed 'Best First'.
Re^3: Pass by value acts like pass by reference
by Anonymous Monk on Jul 12, 2004 at 20:12 UTC
    Of course,it may be a lot easier to just change your algorithm to not corrupt the original arrays....

    That was what I ended up doing, thanks to to tilly's suggestion. Thank you to all who responded.