As nuance stated, $a and $b are special variables to perl (used in things like sort. They don't need to be declared with my because of this). It's highly advisable that you don't use these special variables except for where they are normally expected.
In reply to Re^3: Nested loops
by stevieb
in thread Nested loops
by robert44444uk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |