CSIS054: Perl ProgrammingHomework set 4
|
1. Download the web server log file (150 MB). (You can also practice with this smaller log file.) Use perl to parse the file and generate statistics on:
You might be interested in reading about the standard Apache log format for web server logs. Explore the logs with hash tables code for ideas...
2. Download the CNC GCODE file. It is used to control a cnc mill. Unfortunately, a mistake has been made. To correct it, we need to add 1.55 (inches) to every "Y" value in the file. The File. So for example, a line like the following: N100 X0.474 Y0.287 Should be changed to: N100 X0.474 Y1.837 This change should be made anywhere in the file where there is a Y coordinate listed, except if there is a G90 code on that line.
3. (If you didn't do this in the previous assignment) Save the file words.txt. Write a script that prints each word that occured in the file, one per line, in alphabetical order. If a word occurs in words.txt more than once, only report it once. (A word is a sequence of 1 or more alphabetical characters and the hyphen character. Words are separated by white-space and/or punctuation. Do not include punctuation, except for hyphenated words, in your report.) (If you've already completed the above) Generate a report of:
4. Explore the Content Management script. Choose two of the following enhancements, and add it to the script:
|
Address of this page is http://hhh.gavilan.edu/phowell/csis054/04problems.html
Please contact Peter Howell at phowell@gavilan.edu for questions or comments.
Last updated March 23, 2011.