while (<file_compare>) is reads from the current position in the file until the end of the file. For the second pass of the outer loop, the current position of the file is at its end, as left there by the first pass of the outer loop.
Solution: Seek to the start of file_compare before the inner loop.
In reply to Re: Newbie can't figure out looping a while (if)
by ikegami
in thread Newbie can't figure out looping a while (if)
by Urbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |