in reply to Re^3: at continue, last
in thread at continue, last

Sorry, my reply was clearer in my head then in my written words

I meant to write that if I decremented it as the first statement in the if clause, I'd have to increment later on.

The point of the examples wasn't the decrement, but to examine the ways of finding a single path to cleanup code from a conditional. In particular, I'm trying to avoid the nested if/else/unless clauses.

Replies are listed 'Best First'.
Re^5: at continue, last
by LanX (Saint) on Jun 06, 2014 at 18:35 UTC
    > In particular, I'm trying to avoid the nested if/else/unless clauses.

    As I already explained you have always the same exit point. where the decrement can safely happen.

    May it be last or goto LABEL , you have plenty of possibilities to reach it, w/o nesting if clauses.

    Cheers Rolf

    (addicted to the Perl Programming Language)

      I believe we're in agreement. Thanks.