Question: Write a Perl program that implements a phone book as follows: 2.When the program is run, it prints a main menu on the screen, which

Write a Perl program that implements a phone book as follows:

2.When the program is run, it prints a main menu on the screen, which consists of three messages, as follows:

1- Enter a new name and phone number

2- Search for a phone number 3- Exit

3. The program then waits until the user enter an integer number from 1 to 3 and ignores the rest of the inputs

A. If the user enters 1, the program asks for the name and phone number of the person and stores them. Then, the program shows the main menu again.

B. If the user enters 2, the program asks for the name of the person and returns his/her phone number or a message that the number was not found. Then, the program waits for the user to press any key to show the main menu again.

C. If the user enters 3, the program terminates.

4- In your program,

a.Use a Perl hash table to store the data.

b.Use loop and selection statements to control the flow.

c. Use subprograms to implement the functionalities.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!