if(!defined($hash{$key})) { print "key $key ($hash{$key}) not defined\n"; delete($hash{$key}); next; }