CSCI 4230
 Software Tools
 Fall 1999
 Homework #4

Due: September 21 , 1999

(1)    Write a very simple web-based link verifier, checklink.pl, in CGI-Perl.  The user may submit a link of a home page for link verification using the GET method.  For example, if the url submitted is the following.

http://lattes.uhcl.edu/your_account/checklink.pl?url=http://turquoise.rocks.uhcl.edu/yue/demoindex.html

That is to check the links in the page: http://turquoise.rocks.uhcl.edu/yue/demoindex.html.

The output should be:

To check the url http://turquoise.rocks.uhcl.edu/yue/not_exist.html using

http://lattes.uhcl.edu/your_account/checklink.pl?url=http://turquoise.rocks.uhcl.edu/yue/not_exist.html

To check the url http: http://turquoise.rocks.uhcl.edu/yue/simple.html using

http://lattes.uhcl.edu/your_account/checklink.pl?url=http://turquoise.rocks.uhcl.edu/yue/simple.html

Make sure that your program handles at least the three scenarios above.  Note that a link like <a href="mailto:yue@uhcl.edu"> should not be counted.  Assume that the within the href attribute of your A tag, there is no > symbol and only http and mailto are checked.  Of course, a relative url should be acceptable.  Your output should look as close to the examples above as possible.