in reply to error message in the end of the array looping?

See:
FIND_MATCH: { foreach my $a (@array) { if( $hash{$a} eq 'correct_value' ) { print 'Success'; last FIND_MATCH; } } warn "Didn't find a suitable match!"; }

By targeting the last at the outer block, if you find a match, you completely exit that block. Otherwise, if you make it all the way through the foreach loop without a match, you will hit the warning message right before exiting the block.


--isotope