in reply to Size of the hash value

say ++$#$_ for values %hash;

Replies are listed 'Best First'.
Re^2: Size of the hash value
by Eily (Monsignor) on Feb 22, 2018 at 10:02 UTC

    Except this will increase the array size (append undef to each array). So it will give a different result on each call, always out of date.

      Indeed so. If harishnv requires nullipotence then another similar approach could be employed. Such as

      say $#$_ + 1 for values %hash;

        Why use $#a at all if you want the number of elements?

        say 0+@$_ for values %hash;