in reply to Compare Data

Data::Compare doesn't seem to offer anything natively.

However, you can get the result you want using:

$h2->{FOO}->[1] = $h1->{FOO}->[1];

before comparing.

Of course, this modifies $h2. If you need to preserve $h2, then an option is:

my $save = $h2->{FOO}->[1]; $h2->{FOO}->[1] = $h1->{FOO}->[1]; ... compare ... $h2->{FOO}->[1] = $save;

However, if the number of exceptions is large, this may not be ideal. If you are not worried about efficiency, then you can make a copy of $h2 (using Data::Dumper::Deepcopy() perhaps), modify it as needed, and compare the result with $h1. As you mentioned that the real structure is complex, this may be too great a hit on performance / memory.