in reply to Removing a certain number of hash keys

How about:
for(101..103) { my $key = sprintf("%03d", $_); # sprintf adds leading 0's if needed delete $hash{$key}; }
But I may not really understand what you want.

The Cookbook (5.6) has a solution that allows you to retrieve items from a hash in insertion order. It uses Tie::IxHash.

use Tie::IxHash; tie %HASH, "Tie::IxHash"; #keys in insertion order @keys = keys %HASH;
but I haven't personally tried this yet . . .

Jeff

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)