OUTER: for my $i (@array) { for my $key (keys %hash) { if (...) { ... next OUTER; } } .... }