Lab Assignment

Data file is at http://ccis2161.linux-classes.com/labs/pq1.data

Total assignment value: 25 points
  1. (3 points) Write a perl script to read and display every line, one at a time, from the file pq1.data
  2. (3 points) Write a perl script to sum all the values in the file pq1.data
  3. (5 points) Write a perl script to assign the values in the file pq1.data to an array. The script should also print what it is doing as it runs. At the end of the script, show the contents of the first, fifth and last cells of the array.
  4. (2 points) Take the previous script and modify it to display the total number of items read in.
  5. (5 points) Write a perl script which will show the largest value found in a file given to it
  6. (3 points) Write a perl script which will show the smallest non-negative value in a file given to it
  7. (2 points) Write a perl script which shows every value over 100 from pq1.data
  8. (2 points) Write a perl script which displays all lines which contain the word Display, from a file given to it
  9. (3 points extra credit) Write a single perl script which satisfies the requirements of the first six questions of the lab.