in reply to Re: Size of the hash value
in thread Size of the hash value

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.

Replies are listed 'Best First'.
Re^3: Size of the hash value (nullipotent)
by hippo (Archbishop) on Feb 22, 2018 at 11:55 UTC

    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;