in reply to Re: re-key a hash
in thread re-key a hash

CPU is no object:
%hash = map { ($_, $hash{(sort keys %hash)[$_]}) } 0..keys(%hash)-1;

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^3: re-key a hash
by Aristotle (Chancellor) on Aug 03, 2004 at 02:19 UTC

    That is a bit silly… but I'll concede that it's less obscure than mine. :-)

    Makeshifts last the longest.