Help for this page

Select Code to Download


  1. or download this
    # initialize variables
    
    ...
        # o: output hash neatly
        # r: replace a father
        # x: get a grandfather
    
  2. or download this
    initialize_variables();
    
    ...
      }
    }
    print "Come back again -- goodbye!";
    
  3. or download this
    sub add_son_father_pair {
      print "Enter a male name: ";
    ...
      chomp (my $add_dad = lc <STDIN>);
      $son_father{$name1} = $add_dad; 
    }
    
  4. or download this
    # Nothing special about these:
    sub add_son_father_pair { die "NYI" }
    ...
       my ($task_name, $day_of_week, $task) = @_;
       # Dies on error, otherwise returns $time_of_day the task is schedul
    +ed for
    }
    
  5. or download this
    $ grep NYI my_perl_script.pl
    sub add_son_father_pair { die "NYI" }
    ...
    sub replace_a_father { die "NYI" }
    sub get_a_grandfather { die "NYI" }
    sub add_daily_task { die "NYI";
    
  6. or download this
    sub add_son_father_pair {
      my $name1 = ask_question("Enter a male name: ");
    ...
       chomp(my $answer = lc <STDIN>);
       return $answer;
    }
    
  7. or download this
      my $name1 = lc ask_question("Enter a male name: ");
    
  8. or download this
    sub ask_question {
       my $question = shift;
    ...
       my $question = shift;
       return lc ask_question($question);
    }
    
  9. or download this
    sub add_son_father_pair {
      # show the "before" data
    ...
      print "add_son_father_pair after:\n";
      output_hash_neatly();
    }
    
  10. or download this
     
    $ perl my_perl_script.pl
    Undefined subroutine &main::choose_menu_item called at my_perl_script.
    +pl line 7.
    
  11. or download this
    $ grep TODO my_perl_script.pl
    # TODO pull these next few lines into a frobnicate() subroutine
    # TODO Can solve world hunger .. but this line is too short to contain
    + the solution
    # TODO Try to remember the solution to above TODO!