in reply to Scalars within Subroutines (scope)

Using variables of the same name in different scopes is fine as they are *new* variables within that scope (if they're lexical of course) e.g
my($foo,$bar) = qw(one two); print "($foo, $bar)\n"; { # new scope, new variables my($foo,$bar) = qw(ichi ni); print "($foo, $bar)\n"; } print "($foo, $bar)\n"; __output__ (one, two) (ichi, ni) (one, two)
But I'd highly recommend against using $a and $b as variable names as they are special to sort().
HTH

_________
broquaint