EE-WEB Assignment 9

Program 1, 15pts.

Write a PERL5 program which attempts to open a file and read one variable form it. If the file does not exist, set the variable to zero. Then increase the variable aritmetically by one and write back to the file overwritting the previous contenst. Also display the incresed value on the console and then quit the program. This program will be converted eventually into a web page counter.

Hints:

Program 2, 15pts.

Write a PERL5 program which would read a text file line by line and count the total number of non-empty lines and the number of words.

Hints:

Testing: test your program first on a small text file. Inculde that file with your homework submission

Homework Submission

Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of dynamic Web pages (JavaScript or CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e-mail to the instructor. Please set the message subject to: web-hw9.

Thank you

web site front local main page local list page print this page   general bookmarks software bookmarks go back close this page copyright info   visitor counter