⭐ in reply to How do I empty out a hash?
Update: Of course this makes use of map in void context. Yick. And a couple other suggestions came in by way of followup:my %hash = ( Carol => 22, Mary => 21, Chris => 30 ); map { delete $hash{$_} } keys %hash;
Arnaud
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I empty out a hash?
by Aristotle (Chancellor) on Oct 04, 2003 at 16:10 UTC | |
by Anonymous Monk on Oct 04, 2003 at 16:23 UTC |