in reply to Re^2: returning to the outer loop
in thread returning to the outer loop

I somewhat agree that early exits using named blocks has a place. However there is very often benefit in terms of understanding the intent of code from wrapping "complicated" stuff up in a sub. The immediate benefit is that you can understand the surrounding code providing a context for a chunk of named work. If the name is good understanding both the calling context and the called code should be easier and you don't have to understand everything at the same time.

So, a small part of my reply is "don't use goto", but most of it is "refactor into simple digestible chunks".

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^4: returning to the outer loop
by Laurent_R (Canon) on Sep 21, 2018 at 08:00 UTC
    I definitely agree with you that using a sub and a return statement often makes things clearer than named blocks with other flow control statements. I just don't want to dogmatically reject the next, last and continue control flow statements, as they can offer a good and simple way of finely-tuned control flow.