in reply to Re: Re: Counting Elements output from Data::Dumper
in thread Counting Elements output from Data::Dumper

Hi,

the reason you get an error on scalar @$config is that I goofed :). I missed a level in the data structure referenced to by $config: it's actually a HoAoH (hash of arrays of hashes). So, to get the length of LOGENTRY, you need to access the value of the LOGENTRY key in the hash referenced by $config, and all that in scalar context. In other words: do what LTjake said :).

print scalar %$config This is funny - what's happening here is that you're accessing a hash in scalar context ($config is a hash reference, so %$config is a hash. scalar puts it in scalar context.). This gives you the bucket efficiency of the hash, which is pretty useless in your case.

Sorry for the goof-up.

CU
Robartes-