in reply to How to access info from the array
General answer : References quick reference.
More specific answer: $data{$formname} is an entry in a hash. The wrapping of the @{ ... } around it indicates that this hash entry is a reference to an array. What's being pushed onto the array is an anonymous hash (reference to a hash with no name).
Putting that together listily:
So, to iterate over the keys of that (anonymous) hash, you might do
foreach my $key ( keys %{ $data{$formname}[0] } ) { print $key, " ", $data{$formname}[0]{$key}, "\n"; }
HTH
If not P, what? Q maybe?
"Sidney Morgenbesser"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to access info from the array
by gnangia (Scribe) on Nov 12, 2002 at 21:33 UTC | |
by clairudjinn (Beadle) on Nov 13, 2002 at 02:20 UTC |