|
|
| go ahead... be a heretic | |
| PerlMonks |
Re: Wrong behavior of the implicit smart operator in the given/when blocksby ikegami (Pope) |
| on Apr 30, 2012 at 15:42 UTC ( #968103=note: print w/ replies, xml ) | Need Help?? |
|
The docs say:
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 Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||