sweetblood has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to get a total count of elements in a Hash of Arrays, but can't think or anyway short of iterating through the entire hash. I was thinking
should do it but I get "Can't use string ("###") as an array ref while "strict refs" in use." I know I can get the total by going through the hash and counting the number of elements for each, but would prefer not to.my $count = scalar @{ values %hash };
TIA
Sweetblood
Back to
Seekers of Perl Wisdom