in reply to Hash of Arrays of Hashes Parsing
Careful 'cause this is completely untested.foreach my $key (keys %foo) { if ($key eq "Info") { print "I'm working with the Info array\n"; print "Table name is 'Info'\n"; ### each element of the Info array is a hash reference ### foreach my $info_hashref (@{$foo{'Info'}}) { while (my ($k, $v) = each %$info_hashref) { print "column name is $k, value is $v\n"; } } } else: print "Table name is 'VIN'\n"; while (my ($k, $v) = each %{$foo{'VIN'}}) { print "column name is $k, value is $v\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Hash of Arrays of Hashes Parsing
by SmokeyB (Scribe) on Sep 19, 2003 at 15:12 UTC | |
by hmerrill (Friar) on Sep 19, 2003 at 21:08 UTC |