in reply to Changing key values, i.e. renumbering keys?
As for a technical answer: just order your keys and use a hash slice to pull out the values, and stuff them in an array.
my $hash = { 56 => "jane", 59 => "john", 69 => "joe", 100 => "frank", }; my @array = @{$hash}{sort { $a <=> $b } keys %$hash};
|
|---|