in reply to Recursing through hash of arrays
$_ in the foreach contains the elements, like "a" and "c", but you're using it like an index, like 0, 1, 2. Either walk the index, or walk the list, but not both.foreach (@{$found{$sub}}){ print "$tab$found{$sub}[$_]\n";
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Recursing through hash of arrays
by Popcorn Dave (Abbot) on Jun 24, 2003 at 18:13 UTC | |
by merlyn (Sage) on Jun 24, 2003 at 18:16 UTC |