OK .. here we go:

http://validator.w3.org/checklink/

has a link to the source at the bottom .. you can run it from commandline too .. I had to remove the -T from the top of the script because taintperl was complaining.

Here's the output:

[mschrag@gary mschrag]$ checklink.pl -q -r http://gary.rwd.com/temp/test.html

Processing http://gary.rwd.com/temp/test.html


List of broken links and redirects:

http://gary.rwd.com/temp/test3.html Line: 6
Code: 404 Not Found
To do: The link is broken. Fix it NOW!

----------------------------------------

Processing http://gary.rwd.com/temp/test2.html


List of broken links and redirects:

http://gary.rwd.com/ohgod.html Line: 4
Code: 404 Not Found
To do: The link is broken. Fix it NOW!