in reply to Re: re-key a hash (tye)in thread re-key a hash
by-pass road is modifying of the left part and a bit of right one:
$hash{keys %hash} = $_ for delete @hash{sort { $a<=>$b } keys %hash}; [download]