in reply to Restructuring Teams with Perl

You could simplify this code greatly by using a reverse lookup hash to find representatives' leaders:
my %old_lookup; for my $leader (keys %old) { $old_lookup{$_} = $leader for @{ $old{$leader} }; }
I don't see the need for @nobody and the oldreports() and newreports() subs. Their function seems to ensure that each value in the %old and %new hashes will be array refs. Well, they are. :) If a leader has no reps, then use an empty anonymous array reference:
Bill => [],
That way, the for loop that tries to iterate over the value will gracefully not.

After you build the lookup table, you can easily populate %needtomeet like so:

for my $newtl (sort keys %new) { my %needtomeet; for my $rep (@{ $new{$newtl} }) { my $oldtl = $old_lookup{$rep}; push @{$needtomeet{$oldtl}},$rep if $oldtl; yadda yadda ...
Happy coding, and here's to keeping the PHB at bay. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)