in reply to Re^2: "last" not really outside loop block
in thread "last" not really outside loop block

Try the follwing:

Instead of:

do { ... } while (expr);
use:
while (1) { ... last unless (expr); }