foreach my $sub (keys %subused) { next if exists $subdef{ $sub }; print "UNDEFINED SUB: $subused{ $sub } $sub\n"; }