in reply to Implicit split to @_

I assume it is because you call split in scalar context.
You could also use my $sa = length($vartable{$a});