in reply to Odd behavior of given {when (... or ...) ...}

Since 'a' is true, ('a' or ...anything...) is the same as 'a'. Therefore,
when ('a' or 'b') is the same as when ('a')
when ('a' or $_ ~~ 'b') is the same as when ('a')

The third one is wrong too. It'll say yes no matter what $x contains since ($_ ~~ 'a' or 'b') is always true.

test('c')
gives
N N Y

Replies are listed 'Best First'.
Re^2: Odd behavior of given {when (... or ...) ...}
by ysth (Canon) on Jun 22, 2008 at 20:51 UTC
    No, or and and are intended to work differently in a when() clause. See the (vague and/or confusing) documentation cited by the OP.