in reply to Re^2: Please correct my sorting in this HoA
in thread Please correct my sorting in this HoA

Your syntax looks a bit odd to me. I would code thusly (as personal preference):

foreach my $id ( sort keys %HoH ) { print ">$id: \n"; for my $pos ( sort { $a <=> $b } keys %{$HoH{$id}} ) { print "$pos:$HoH{$id}{$pos}\n"; } print "\n"; }