I don't know about your stated problem, but your loops have an off-by-one error:
my $count = @{ $doc->{$sub1} }; print "\n$sub1\t"; for (my $i=0; $i <= $count; $i++) {
Should be:
my $count = $#{ $doc->{$sub1} }; print "\n$sub1\t"; for my $i ( 0 .. $count ) {
The same applies to $count2 and $count3.
In reply to Re: Nested Loops vs Good programming
by jwkrahn
in thread Nested Loops vs Good programming
by Sporti69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |