next or last in block (not in loop) generates bad code. Per the definition, a block that just starts with { is treated as a loop that runs once, so a next or last statement should break out of it. Instead it generates a continue or break which python flags as an error.
Also check this out: If you're in a sub {...} and that sub was called from a loop, perl lets you next or last the loop from inside the sub!!
next
orlast
in block (not in loop) generates bad code. Per the definition, a block that just starts with{
is treated as a loop that runs once, so anext
orlast
statement should break out of it. Instead it generates acontinue
orbreak
which python flags as an error.Also check this out: If you're in a sub {...} and that sub was called from a loop, perl lets you
next
orlast
the loop from inside the sub!!