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.
givestest('c')
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 |