when($foo)is exactly equivalent to
when($_ ~~ $foo)
Not when ($foo ~~ $_). The value passed to given is the thing being checked. In your example, the first case matches because your string matches your hash, but the next two fail because your hash doesn't match your string.
In reply to Re: Wrong behavior of the implicit smart operator in the given/when blocks
by ikegami
in thread Wrong behavior of the implicit smart operator in the given/when blocks
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |