#!/usr/bin/perl -w use strict; my %hash = ( Carol => 22, Mary => 21, Chris => 30 ); my( $k, $v); while(( $k, $v) = each %hash ) { delete $hash{$k}; }