in reply to Sort hash by key length and alphabetically

my @sorted = sort { length($a) <=> length($b) or $a cmp $b } keys %count;