theiss has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm wondering if there's an easier way to get the sizes of hash elements which are also hashes.
IE:
INPUT FORMAT Volume-Chapter-Section-Item (value):
B-001-01-01 (2)
...
B-999-99-99 (x)
while (<>) { if (/^(\w{1})\-(\d{3})\-(\d{1,2})\-(\d{1,2})\s+\((\d+)\)/) { # print "$1, $2, $3, $4, $5\n"; $hash{$1}{$2}{$3}{$4} = $5; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to find size of each hash of hashes
by GrandFather (Saint) on Sep 24, 2011 at 02:41 UTC | |
|
Re: How to find size of each hash of hashes
by Anonymous Monk on Sep 24, 2011 at 01:40 UTC |