I'm trying to write a program that verifies HTML links and then spiders through the site and checks the links on all the subsequent pages it turns up. I'm using HTML::LinkExtor and LWP::Simple to verify the links. My problem comes with implementing a spider that doesn't end up in an infinite loop. Any ideas for keeping track of visited pages and how to avoid returning to them?