Clownburner has asked for the wisdom of the Perl Monks concerning the following question:
I need to get the count of how many elements are in the lowest level of this structure (that is, how many @outputs are there in the hash $results{$addr}).push @{$results{$addr}},[@output];
returns an array with a single element, that then contains all the @output's. But if I try to 'scalar @a' I get '1', and if I scalar @a[0] or scalar($a[0]) I get a bunch of ARRAY refs.my @a = $results{$addr};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Counting the elements of a hash of arrays of arrays
by broquaint (Abbot) on May 14, 2003 at 18:46 UTC | |
by Clownburner (Monk) on May 14, 2003 at 19:18 UTC | |
|
Re: Counting the elements of a hash of arrays of arrays
by bigj (Monk) on May 14, 2003 at 18:46 UTC | |
|
Re: Counting the elements of a hash of arrays of arrays
by artist (Parson) on May 14, 2003 at 18:50 UTC | |
|
Re: Counting the elements of a hash of arrays of arrays
by suaveant (Parson) on May 14, 2003 at 18:52 UTC |