On Nov 28, 2003, at 6:26 PM, Jason Dusek wrote:


Let's say I have a hash of hashes.  And I want to use it over
and over again, so I need to reinitialize it often.

There are two issues here,


a. how did you initialize it to begin with
        and why not simple re-use that solution

b. have you looked at perldoc -f delete

assuming that you really DO need to reinitialize it 'often'
in the first place.


I suppose I could go through each key in the hash of hashes,
and go through each key in the little hashes and use delete
on each of them.  But isn't there some elegant way?
Does Perl have a nuke() operator?

The other idea would be to look at the 'scope' of your hoh - you might also want to review say:

<http://www.rocketaware.com/perl/perldsc/ HASHES_OF_HASHES.htm#HASHES_OF_HASHES>

which has some nice ideas - depending upon the
depth of your hoh that is...



ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to