in reply to Re: re-key a hashin thread re-key a hash
my $count = 0; %hash = map { $count++ => $a{$_} } sort { $a <=> $b } keys %hash; [download]
There's no delete in mine either of course, and you still need two statements your way. :-) It's what I'd probably use in production code though.
Makeshifts last the longest.