oaklander has asked for the wisdom of the Perl Monks concerning the following question:

Is there any script that is available to check all web links in a directory. I have many html files in one directory and need to check if all the URL links are valid. The links consist of absolute and relative paths.

Replies are listed 'Best First'.
Re: Checking URL links
by rob_au (Abbot) on Dec 28, 2001 at 17:08 UTC
    There are countless such scripts available from sites such as (including this one, this one and this one).

    On this site, I simply typed Link Checker into the search box and sure enough, an excellent example from tachyon was found here - In addition to checking href links, this script also checks img links and mailto links (for RFC822 compliance).


    perl -e 's&&[@.]/&&s&.com.&_&&&print'

Re: Checking URL links
by newbie00 (Beadle) on Dec 28, 2001 at 23:51 UTC
    Here is another source for checking links. It is located at WebTester and it is easy to install and use. It does require either Telnet or SSH.

    Hope this helps.