in reply to Nested Loops vs Good programming
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Nested Loops vs Good programming
by ikegami (Patriarch) on Nov 14, 2008 at 20:05 UTC |