for my $key ( sort {$a<=>$b} keys %hash_of_lists ) { for my $t ( 0 .. $#{$hash_of_lists{$key}} ) {