in reply to Re: Apocalypse 4 on perl.com
in thread Apocalypse 4 on perl.com

By Larry's explanation, the idea of default was to prevent given's which don't have any when's from looking funny.
Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Re: Apocalypse 4 on perl.com
by scott (Chaplain) on Jan 20, 2002 at 21:23 UTC

    Hmmm ...

    given EXPR { otherwise { ... } } given EXPR { default { ... } }

    default definitely looks better here. I wonder how often people write empty switch statements though? Then again, given isn't your father's switch so past coding patterns may very well not apply.