- or download this
# initialize variables
...
# o: output hash neatly
# r: replace a father
# x: get a grandfather
- or download this
initialize_variables();
...
}
}
print "Come back again -- goodbye!";
- or download this
sub add_son_father_pair {
print "Enter a male name: ";
...
chomp (my $add_dad = lc <STDIN>);
$son_father{$name1} = $add_dad;
}
- 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
}
- 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";
- or download this
sub add_son_father_pair {
my $name1 = ask_question("Enter a male name: ");
...
chomp(my $answer = lc <STDIN>);
return $answer;
}
- or download this
my $name1 = lc ask_question("Enter a male name: ");
- or download this
sub ask_question {
my $question = shift;
...
my $question = shift;
return lc ask_question($question);
}
- or download this
sub add_son_father_pair {
# show the "before" data
...
print "add_son_father_pair after:\n";
output_hash_neatly();
}
- or download this
$ perl my_perl_script.pl
Undefined subroutine &main::choose_menu_item called at my_perl_script.
+pl line 7.
- 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!