in reply to problem in for loop
You have 20 elements in the array (20 lines in your input), and the last time through the loop, $i=18, but $i+3=21.$file_array[$i+3]
Tip #2 from the Basic debugging checklist : add print "$i\n" near the top of your loop.
|
|---|