Scripts and Utilities -- Perl lab


  • Jim Plank
  • Due: 3:30 PM, Tuesday, July 30.
  • This file: http://www.cs.utk.edu/~plank/plank/classes/cs494/494/labs/Perl/lab.html
  • Perl lecture notes
  • Guest TA: Elton Wells (wells@cs.utk.edu).
    Write the following programs as perl programs. Read the entire lecture notes before starting. All information that you need is contained in the lecture notes somewhere.

    Note you should not use pipes in your programs. Do it all within one process.

    1. square from the awk lab. This should take less than a minute.
    2. unhtml from the sed lab. This should also take less than a minute.
    3. golf from the awk lab.
    4. mail_strip from the sed lab.
    Other programs you should try if you want to do more. These will not count nor will they be graded. They are simply for your edification if you want to do more.
    1. fixit from the sed lab. You may want to use the tr feature for some of this. Note that the ability to ignore case is a godsend here.
    2. unhtml again, but this time have it work on html tags that span lines. You may have to read the man page on pattern matching strings that contain newlines.
    3. calcavg from the awk lab.
    4. ckpproc from the awk lab.