CIS 2279 Homework Assignment #10

Due Mon Nov 7, 2016

Create a perl script named lab10.pl. The script needs to have the following features:(5 points each)

  1. Prompt the user to enter a path.
  2. Check that the entered path is a directory. Either quit or ask again if the path fails the directory test.
  3. Scan the contents of the directory for any files.
  4. Determine the oldest file in the directory (based on modification date) and print the results to both the screen and a file named tmp.txt using the file's absolute path.
  5. Determine the smallest file in the directory and print the results to both the screen and the tmp.txt file using the files absolute path. (Max/min code example here.)
  6. Rename the tmp.txt file to lab10.output.txt
solution

last updated: 03 Nov 2016 16:22