Pfft, forgetting to /inc is a ridiculously common problem for not just mIRC scripters, but for programmers of any and all languages that allow for such loops in general!

In my years of experience in mIRC scripting I have developed a simple method to semi-counter it.
In every while condition I have, I add "&& $read(<file>,<line>) == 1", and if mIRC freezes on me because of said while loop, I just go(manually) to the file and change that line to "0".

True, this takes more effort then a simple Ctrl+Brake does, but it allows the rest of the code to run, whereas Ctrl+Brake halts the script before the rest of it runs.
Not always a necessity, but it can be useful sometimes.

But I do agree that the while solution is just as good as a foreach, making it not worth the effort.

ziv.