Perl Homework #4
Create one main program with a separate function for each menu
option:
Find a word in a file - Ask the user for two words. Print all the
rows in a file called mytable that do not start with either word.
Hash table - Create a hash table that holds names of people and
their phone numbers. The name is the key. You can just hard code the
values without asking for input. Then display all the names on the
screen. Ask the user to enter a name from the list on the screen.
Display that name's phone number.
Note, you can use this sample to create the hash table, though put
in names of your friends:
my %phonelist = (
"mary", "555-213-2122",
"john", "325-2352-2532",
"james","352-5223-2525");
Use this syntax to pull a value out of a table given a key:
$marysphonenumber = $phonelist{mary}
Do not forget to chomp the input from the user.