in reply to For- loop increment not passing to inner block
If so, I don't see where you are incrementing $i.while (my $line = readline(SORTD)) { my $number = substr($line, $i*2, 2); }
The way the for loop works is that $i will not be incremented until the end of the for block is encountered, so $i is not going to be incremented inside the while loop unless you explicitly do it yourself.
|
|---|