in reply to Sorting HoHoA based on Length of Second Key
use Sort::Key qw(ikeysort); my @sorted_keys = ikeysort { length ( (%{$HoHoA{$_}})[0] ) } keys %HoHoA; [download]