Perl Home | Notes | Exercises | Resources | perl Thoughts | Jen's Home | Summer Perl Seminar |
Week 3 ExercisesExercise 1We searched through Ken Lay's emails for addresses and phone numbers. Now search it for email addresses. You can start with a simple pattern of non-space characters, but refine it as you see things that don't make sense. As you refine, be sure to allow for dots, dashes, and underscores but not other punctuation.
Exercise 2 (Hard)Going through the Ken Lay Emails, you will see each message starts with a To: and a From:. Build a list like the one I supplied last week where, for each email, you print a line that lists the sender and recipient:Exercise 3Why is this funny?Exercise 4 (Easy)Here are some simple exercises for you to try. For each, start with the string below and write a script to see if the string matches the given pattern.
|