http://qs321.pair.com?node_id=182028


in reply to Re: GOTO considered (a necessary) evil?
in thread GOTO considered (a necessary) evil?

If your target label in a goto is undefined, perl won't complain until it tries to actually execute the goto, even when using strict and warnings. If your goto is handling a "once in a thousand years" case, then you're likely not to notice this typo until it's too late.

Ofcourse, you have the same problem if you use a subroutine/method call (though you would probably not use those in the same situation).

Myself, I would prefer

while (1) { .... .... last unless (EXPR); }
Which makes very clear that this is a loop (even though it might not loop more than once 99% of the time) and it "forces" some structure (which is not always a bad thing), and it might make you see the problem from a new perspective - TIMTOWDI after all.
-- Joost downtime n. The period during which a system is error-free and immune from user input.