knirirr has asked for the wisdom of the Perl Monks concerning the following question:
What this is supposed to be doing is counting the number of strings found in file $b that are of group $c and subgroup $d and length $e. Loading this structure up works nicely according to the output of Data::Dumper. The next problem is that I need to produce several summary files:{ $a{$b}{$c}{$d}[$e]++; }
file_b
{
group_c_item => {
'group_d_item' =>
[
undef,
undef,
N
]
}
};
...where N is the number of items of length 3.
Can anyone suggest a simple way of printing this output so
I could get something like:
length|unique_d_1|unique_d_2|...etc 1 | 1 | 0 | 2 | 2 | 4 | 3 | 0 | 2 | etc......for example? I've tried a few ugly loops, but with no success.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extracting data from nested hashes
by kvale (Monsignor) on Nov 17, 2004 at 17:30 UTC | |
by knirirr (Scribe) on Nov 17, 2004 at 17:38 UTC | |
|
Re: Extracting data from nested hashes
by hmerrill (Friar) on Nov 17, 2004 at 17:16 UTC | |
by knirirr (Scribe) on Nov 17, 2004 at 17:30 UTC | |
by hmerrill (Friar) on Nov 18, 2004 at 13:11 UTC | |
by knirirr (Scribe) on Nov 18, 2004 at 14:05 UTC |