use warnings; use strict; my ($outer_hr_aref, $inner_hr_aref); foreach my $outer_href (@$outer_hr_aref) { foreach my $inner_href (@$inner_hr_aref) { if (($$outer_href{key1} eq $$inner_href{key2}) & ($$outer_href{key3} == $$inner_href{key4})) { #abitrary key assignment could be other combinations print "status found: $$inner_href matching $outer_href\n"; $$outer_href{key1} = 'something_new'; #arbitrary, other function calls can occur #somehow now remove the $inner_href item from the @$inner_hr_aref so i don't have to search the entire aref again. last; } } }