hhdave, see borisz's response above yours. Basically, $a and $b are on the short list of special variables that are automatically declared by perl, so they already exist in any scope.
As of perl 5.6, you should probably just use my instead of local anyway, but use a variable with meaning to you, not a special one like $a or $b. . .