c has asked for the wisdom of the Perl Monks concerning the following question:
use strict; my %one; my %two; my %three; my @hashes = qw(one two three); for my $i(@hashes) { for my $j(keys %$i) { #do something } }
I get the big gong show 'no strict refs' error on this one. how can i look through a set of hashes using keys, yet keeping them seperate in the loops?
humbly -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: foreach keys over multiple hashes
by jeffa (Bishop) on Jun 19, 2002 at 20:18 UTC | |
|
Re: foreach keys over multiple hashes
by Aristotle (Chancellor) on Jun 19, 2002 at 20:18 UTC | |
|
Re: foreach keys over multiple hashes
by thelenm (Vicar) on Jun 19, 2002 at 20:20 UTC |