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


in reply to Re: How do I empty out a hash?
in thread How do I empty out a hash?

Easier yet.
delete @hash{(keys %hash)};
Update: this is, of course, only useful when you want to use delete the keys from one hash in another one, as in
delete @foo{(keys %bar)};
Otherwise, only the below solution makes any sense.

Makeshifts last the longest.