Assuming you mean in the order they were saved in the hash, the module
Tie::IxHash provides such access. It should have sufficient examples, but i'll briefly describe what it does...
When you tell perl to bind a normal hash interface with what's called a tied object, in this case a Tie::IxHash tied object, the object takes care of the internals. The Tie::IxHash module provides internal structures which contain regular hashes and arrays, containing additional data to determine the order, not only the value. The interface is the same, but allowes different functionality.
When you've tied your hash to a Tie::IxHash you may then
delete(@hash{(keys)[0 .. 2]}). That approach, though functional, is good for 10 elements but not many more. You should probably delete iteratively, using
each.
Update: Changed IxHash to Tie::IxHash, squashed a typo.
-nuffin
zz zZ Z Z #!perl