my %hash = qw(foo one bar two baz three); my $hash_len = 0; $hash_len += length for values %hash; print "hash length is $hash_len\n"; __output__ hash length is 11