mhearse has asked for the wisdom of the Perl Monks concerning the following question:
How can I iterate over the anonymous array in the data value? I thought this would work, but it doesn't:$VAR1 = { 'key' => { 'data' => [ [ 'Element1', 'Element2', 'Element3' ], [ 'Element1', 'Element2', 'Element3' ] ] }
for my $elmt (@{$book->{$key}{data}}) { .... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help dereferencing a data structure
by NetWallah (Canon) on Mar 27, 2008 at 05:47 UTC | |
|
Re: Help dereferencing a data structure
by planetscape (Chancellor) on Mar 27, 2008 at 09:32 UTC | |
|
Re: Help dereferencing a data structure
by wade (Pilgrim) on Mar 27, 2008 at 04:08 UTC |