in reply to What's the point of a labeled block without a loop?

Sometime, I use it to implement 'switch':
SWITCH: { if (...) { ..... ; last SWITCH } elsif (...) { ..... ; last SWITCH } elsif (...) { ..... ; last SWITCH } }

Replies are listed 'Best First'.
Re^2: What's the point of a labeled block without a loop?
by ambrus (Abbot) on Dec 17, 2005 at 11:17 UTC

    If you use elsif, what's the point of the last statements?

      it's there for consistency's sake only because I am obsessed with it... :D you can leave it out, but if you want to add more elsif, you have to remember to put 'last SWITCH' on that block... saving me from future bugs :D

      --------------
      badaiaqrandista