Modify the last program you wrote to incorporate the die


PERL - Simple PERL scripts to do the following:

1. Write a program that reads in a file (pick any file from the directory) and display the contents of that file, line by line. Make sure the end of file is handled properly, and remember to close the filehandle after you are finished. Prompt the user for the filename to be read.

2. Modify the last program you wrote to incorporate the die statement to handle file open errors. You can use a custom message if you want.

3. Write a program that creates a file called data.dat in the current directory. Prompt the user for five numbers, and write them, one at a time, on both the screen and into the file. Close the file, then open it again for reading only, and display the contents on the screen. Handle error conditions that may occur.

Request for Solution File

Ask an Expert for Answer!!
Management Information Sys: Modify the last program you wrote to incorporate the die
Reference No:- TGS02886349

Expected delivery within 24 Hours