in reply to exit a loop

If I understand what you are asking, and your code, a simple "last" should do the trick (since your "for" loop is the innermost enclosing loop).

If a bare "last" doesn't meet your needs, you can check the documentation on labels (which allow you to apply a "last" to a specific loop).

Tom Melly, tom@tomandlu.co.uk