EE-WEB Assignment 10

Program 1, 15pts.

Write a PERL program which reads the date in one of the following formats and validate it using only one single regular expressin formula for each format. Print the date using the format oposite to one which was used for input.

Please nothe that the regular expression formulas may be long and complicated. Inspect the similar example about validating time that is posted on the web page with sample programs.

Program 2, 15pts.

Write a program in PERL which would print the directory structure of the specified hard drive or its directory. Your program should accept two command line parameters - the directory or drive letter to start from, and the number of levels deep to go. If the second parameter is not specified go all the way to the most nested folder. The directories should be listed alphabetically. Add four space indentation for each next level.

Hints:

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-hwA.

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