Pull the results off each table into arrays. Run a map over both arrays to increment the value of the key that matches the name. Bold if value > 1.
my @table1 = GetNames( 'Table1');
my @table2 = GetNames( 'Table2');
my %names = ();
map {$names{$_}++} (@table1, @table2);
while (my ($name, $weight) = each %names) {
if ( $weight > 1 ) {
PrintBoldly($name);
} else {
PrintNormally($name);
}
}
"One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
- Henry David Thoreau, Walden