Summer 1998
Programming in PERL
Assignment for Class 5 - 7/7/98
Read the material in chapters 9 and 10 and answer the questions at the end of the chapters. (The answers are in the back of the book.)
1. Modify program7_6 so that it will find occurrences of the word the regardless of the case of the letters. So that it will also find The, THE, tHe etc.
2. Modify program7_7 to do the same for the input pattern. This may not be as simple as it may seem at first. Think about it.
3. One method of communicating with a web browser returns plus signs, + in place of spaces. Write a PERL program to read in a string and break it up into words assuming that there are one or more plus signs separating the words. Print out the line with one space separating the words.
4. Try to fix up program7_9 to actually valid dates. Recall all the discussion in class about the year 2000. Don't be afraid to add special case programming if needed.
5. Write a program that reads in text and replaces he with she, him with her and his with hers and so on.