sub add_son_father_pair { # show the "before" data print "add_son_father_pair before\n"; output_hash_neatly(); my $name1 = ask_question("Enter a male name: "); if (exists $son_father{$name1}) { print "Duplicate name -- try again!\n"; return; } my $add_dad = ask_question("Add a father: "); $son_father{$name1} = $add_dad; # Did we do it right? print "add_son_father_pair after:\n"; output_hash_neatly(); }