Scripts and Utilities -- Perl lab
- Fall 2002
- cs300
- Due: Friday before class November 1
- Perl lecture notes part1 and part2
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.
Do number 1 and 2. Choose between number 3 and 4.
- square from the awk lab.
This should take less than a minute.
- unhtml from the sed lab.
This should also take less than a minute.
- calcavg from the awk lab.
- golf from the awk 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.
- 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.
- 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.
- mail_strip from the sed lab.
- ckpproc from the awk lab.