my @key_hash = sort { substr($a,0,3) cmp substr($b,0,3) } keys %key_hash;