in reply to Re: elseif syntax error
in thread elseif syntax error

But if you use multiple if both blocks can be executed, and in case of using "elsif" construction only one block is executed. Or not? :)

Replies are listed 'Best First'.
Re^3: elseif syntax error
by GrandFather (Saint) on Oct 28, 2009 at 18:46 UTC

    Look again. Not if you use an early exit at the end of each block.

    The whole point of the technique is to use an early exit at the end of each block to avoid the need to nest blocks and allow else blocks to turn into a simple unindented block of code.


    True laziness is hard work