Why use $#a at all if you want the number of elements?
say 0+@$_ for values %hash; [download]
In reply to Re^4: Size of the hash value (nullipotent) by ikegami in thread Size of the hash value by harishnv