map { $_[0] } sort { $a->[1] cmp $b->[1] } map { [ $_, grabdataentry(\%hash, $_, 0) ] } keys %hash;