Think about Loose Coupling | |
PerlMonks |
Re: How do I empty out a hash?by DigitalKitty (Parson) |
on Aug 16, 2003 at 01:51 UTC ( [id://284293]=note: print w/replies, xml ) | Need Help?? |
Hi.
You could also iterate over the hash and delete each key/value pair with this:
The previous solutions are more efficient but I thought you might appreciate an alternate method. Update: Several followups included these suggestions:
Both of those methods ignore the values, which are unimportant when deleting hash table entries.
In Section
Seekers of Perl Wisdom
|
|