my %HoTypes = ( 'PythonQuestions' => [ '[PythonQuestions|Python Questions]', 318, 3, 10, 0 ], 'OffTopics' => [ '[OffTopics|Off Topic Post]', 500, 3, 10, 1 ], 'notes' => [ 'Notes', 283, 3, 20, 2 ] ); #### for my $T ( sort { $HoTypes{$a}[-1] <=> $HoTypes{$b}[-1] } keys %HoTypes ) { my $nodeStr = $HoTypes{$T}[0]; print "$T -> $nodeStr\n"; }