An "if block" is not considered a looping construct on it's own, it's an exception, so the loop exit statements don't work. What you can do is make the "if block" contain just a "bare block". Since a bare block is considered a loop then it works, so:
if (true) {
yada;
yada;
next if $foo;
yada;
yada;
}
Doesn't work,
if (true) {
{
yada;
yada;
next if $foo;
yada;
yada;
}
# next comes here
}
Does.
Nuance
Baldrick, you wouldn't see a subtle plan if it painted
itself purple and danced naked on top of a harpsichord,
singing "Subtle plans are here again!" |