It would be nice (sometimes) if perl had this functionality, but sadly it's not that easy. You probably need to investigate WWW::Mechanize and possibly LWP::UserAgent or LWP::Simple. Essentially you will load a page via a web request, parse it for links, and then follow each link, possibly recursively. This sounds a lot like spidering, so you may also want to look into the various Spider modules like WWW::CheckSite::Spider.
Oh, you could also look at wget and similar tools.