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

Yeah, me too. I don't know why I suggested it. Another generic solution is to change the bottom tested loop into an infinite loop.
do { ... next if ...; # XXX ... last if ...; # XXX ... } while cond();
becomes
for (;;) { # for ever ... next if ...; # OK ... last if ...; # OK ... last if !cond(); }