See the documentation for the core Switch module. given/when in Perl 5.10 is more robust, and Perl 6 works effectively.
The failure case isn't too esoteric; the use of regular expressions in your code can confuse Switch.
In reply to Re^4: if or switch?
by chromatic
in thread if or switch?
by gw1500se
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |