in reply to Sorting HoHoA based on Length of Second Key

This will sort on the length of the first key found in each inner hash, then ASCIIbetically on the keys of the main HoHoA for ties:
my @sorted = map {substr $_,2} sort map { pack 'na*', length((%{$HoHoA{$_}})[0]), $_ } keys %HoHoA;

This is a Guttman-Rosler Transform - it packs the length of the first key of each inner hash (assumption: each inner hash has all keys the same length - you can't guarantee to get an AA.. key rather than a BB.. key as the `first') into 2 bytes in network order (assumption: no inner hash key has length >65535) and appends the main hash key.

The resulting list of strings can be sorted by the fast default sort and the substr throws away the two-byte length marker, leaving just the keys.

HTH

Jonathan