Do not use variables named $a and $b.
Perl has predefined variables named $a and $b which are used for sort. It is possible to use them for other purposes (List::Util does), but only via a lot of careful thought (or a lot of luck).
In reply to Re: Loops and variable usage
by tobyink
in thread Loops and variable usage
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |