my $hash = { 56 => "jane", 59 => "john", 69 => "joe", 100 => "frank", }; my @array = @{$hash}{sort { $a <=> $b } keys %$hash};