use strict; foreach my $element1 (@array1) { foreach my $element2 (@array2) { foreach my $key (keys %{$element1}) { next if (%{$element1}->{$key} = %{$element2}->{$key}); ## OK Here's where the magic needs to happen. ## If there's a difference, I need the entire hash, %{$element1}, ## saved to the element of a new array with the "CHANGED" key in place } } }