in reply to print array of hashes
In this one record or in all records?
my $kids= scalar @{$rec[0]{kids}};
If you want the sum of kids in all records you just have to add a loop around that line:
my $kids; foreach my $record (@rec) { $kids+= scalar @{$record->{kids}}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print array of hashes
by rovf (Priest) on Apr 22, 2010 at 15:23 UTC | |
by muba (Priest) on Apr 24, 2010 at 01:02 UTC | |
|
Re^2: print array of hashes
by fionbarr (Friar) on Apr 22, 2010 at 12:42 UTC |