Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: foreach keys over multiple hashes

by thelenm (Vicar)
on Jun 19, 2002 at 20:20 UTC ( [id://175836]=note: print w/replies, xml ) Need Help??


in reply to foreach keys over multiple hashes

Instead of using soft symbolic references, you could use hard references. For instance, something like this:
my %one; my %two; my %three; my @hashes = (\%one, \%two, \%three); for my $hash (@hashes) { for my $key (keys %$hash) { # do something } }

-- Mike

--
just,my${.02}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://175836]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-03-28 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found