my %hash = qw( 100 g 101 j 102 d 103 h 104 t 105 a ); my $number = 3; my $start = 101; delete @hash{$start .. $start+$number-1};