%ignore = map { $_ => 1 } @ignore;
@diff = map { $a{$_} ne $b{$_} }
grep { !$ignore{$_} } keys %a;
@diff will end up with a list of key/value pairs of %a that are
different from %b, excluding those of %ignore.
note: this is untested.
Chris
On 7 Feb 2002, Chas Owens wrote:
> I have t
On Thu, 2002-02-07 at 13:21, Jeff 'japhy' Pinyan wrote:
> On Feb 7, Chas Owens said:
>
> >I have two hashes (%a and %b) that contain data for one person from two
> >different systems and I want to compare these hashes to see if the
> >systems are out of sync. The catch is I know that some of the
On Feb 7, Chas Owens said:
>I have two hashes (%a and %b) that contain data for one person from two
>different systems and I want to compare these hashes to see if the
>systems are out of sync. The catch is I know that some of the fields
>will always be different and I want to ignore those field
I have two hashes (%a and %b) that contain data for one person from two
different systems and I want to compare these hashes to see if the
systems are out of sync. The catch is I know that some of the fields
will always be different and I want to ignore those fields. Below is my
solution, does a