CIS 2279 Homework Assignment #09
Due Friday, Oct 08,
2010
All files created must be saved in your class directory
/mnt/homes/CLASSES/CIS2279/<username>
- Create a perl script named lab09.pl in your user directory. The
script that has the following features:
- Open the file /mnt/homes/CLASSES/CIS2279/LAB09/list.txt in
read-only mode.
- Read through the file and filter out strings that match the
following:
- Strings that contain the text "ak" or
"eq" in them.
- Strings that contain three vowel characters in a row
("aeiou", including "y").
- Strings that begin with the letter "s", have
"e" as the fourth character and end with the letter
"y" .
- Print the matching strings for each of these items to the
screen and to a file in the user's home directory (any user who
runs the script, not just your home directory). From lab #7 we had shown the
%ENV hash contains all the values from the user
environment. The path to the user's home directory is defined by
the "HOME" key. So $ENV{HOME} will return
the path to the user's home directory.
Solution
last updated: 04 Oct 2010 20:01