Is there a reason you have the while-loops separated? Why not combine them and instead of breaking out when you find the first line, set a flag that says "I should be handling these lines" once you find the first good line. So, instead of "last when found", do "next unless found or this line is ok".
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: Skip and Scan Lines
by dragonchild
in thread Skip and Scan Lines
by jc7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |