use strict; my %one; my %two; my %three; my $hashes = [\%one, \%two, \%three]; for (@$hashes) { for my $k (keys %$_) { #do something } }