my %hash = ( foo => 1, bar => 2, baz => 3, ); OUTER: for (map{[$_,{%hash}]} qw(this that the_other)) { my ($item,$hash) = @$_; print "$item:\n"; while (my ($key, $value) = each %$hash) { print " $key => $value\n"; if ($item eq 'that' && $key eq 'baz') { print "bailing out!\n"; next OUTER; } } }