%x=qw/airplanes 5 class. 7 I 0 in 6 not 2 paper 4 throw 3 will 1/; print qq{@{[map {$_ ->[0]} sort{$a->[1]<=>$b->[1 ]}map{[$_, $x{$_}]}keys %x]} } for 1..length 'x' x 2 x 5 x 5 x 5 x 2; $a;$b;$c;$d;$e;