If your data is key driven then you can use a hash to find the unique keys and then grep them from the list.
my @wanted; my %keys; $keys{$_->{flag}}++ foreach (@array1, @array2); my @unique = grep {$keys{$_->{flag}} == 1} @array2; print Dumper(@unique);
In reply to Re: compare an array of hashes
by inman
in thread compare an array of hashes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |