my %ds1_tables = (); my %ds2_tables = (); foreach my $key (keys %{$DS1{PERL}[0]{TABLES}}) { $ds1_tables{$key} = 1; } foreach my $key (keys %{$DS2{PERL}[0]{TABLES}}) { $ds2_tables{$key} = 1; } foreach my $key (keys %ds1_tables) { if (!exists $ds2_tables{$key}) { print "$key does not exist in table 2.\n"; } else { print "$key exists in table 2.\n"; } }
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
In reply to Re: Comparing 2 arrays of hashes
by nysus
in thread Comparing 2 arrays of hashes
by raghuprasad241
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |