in reply to Re: Succinct switch statement
in thread Succinct switch statement

No, it can't. You get error Can't use when() outside a topicalizer (5.10.1).

Replies are listed 'Best First'.
Re^3: Succinct switch statement
by moritz (Cardinal) on Oct 24, 2009 at 13:58 UTC
    I tested it with a for loop, which works. The difference seems to be that while doesn't limit the scope of $_ in any way.