USP45 has asked for the wisdom of the Perl Monks concerning the following question:
- If one of those is correct what goes in the blank if I want to iterate through one of the arrays?e.g. my %animals = ( pets => [ qw(cat dog) ], non => [ qq(rhino giraffe) ], );
foreach $i (???) { push ( @some_animals, $animals{pets}[$i] ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash of Arrays (populating and iterating)
by pc88mxer (Vicar) on Mar 06, 2008 at 01:37 UTC | |
by Cody Pendant (Prior) on Mar 06, 2008 at 02:07 UTC | |
by USP45 (Novice) on Mar 06, 2008 at 14:41 UTC | |
by USP45 (Novice) on Mar 06, 2008 at 02:30 UTC | |
by nithins (Sexton) on Jan 30, 2014 at 09:44 UTC | |
by Athanasius (Archbishop) on Jan 30, 2014 at 15:47 UTC |