in reply to foreach keys over multiple hashes

By using references:
use strict; my %one; my %two; my %three; my $hashes = [\%one, \%two, \%three]; for (@$hashes) { for my $k (keys %$_) { #do something } }
UPDATE: storing them in an array reference is not necessary, i just wanted to show how to do so. :) But you do have to store the hashes as reference or else they will 'flatten' into the array that contains them.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)