I will, however, mention one thing which is not related to your problem but which you should be aware of. The $a and $b variables are special, and should not be used unless you really mean to use them. Which you don't. So don't.
In reply to Re: Pattern mattching
by DrHyde
in thread Pattern mattching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |