|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: how do I efficiently remove one hash from another?by Anonymous Monk |
| on Nov 27, 2012 at 21:48 UTC ( #1005930=note: print w/ replies, xml ) | Need Help?? |
|
When something needs to be in more than one structure at a time, the notion of "references" makes this very-easily done. There's only one item of data, with n references to it, and the data won't disappear from memory until the reference-count becomes zero. (But avoid "self-referencing" data objects; see "weakened" references.)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||