Minimal fix (<= ⇒ <):
my $count = @{ $doc->{$sub1} }; for (my $i=0; $i<$count; $i++)
Easier to read:
my $count = @{ $doc->{$sub1} }; for my $i ( 0 .. $count-1 )
Alternative:
my $last = $#{ $doc->{$sub1} }; for my $i ( 0 .. $last )
In reply to Re^2: Nested Loops vs Good programming
by ikegami
in thread Nested Loops vs Good programming
by Sporti69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |