in reply to Re: Building a Spidering Application
in thread Building a Spidering Application

I have a flow chart-

I download the original webpage and print out the content as well as all the links. I then want to get( $URL) of each of the URL's that are linked to on the original webpage. I don't know how to write a code that will get each subsequent URL.

Replies are listed 'Best First'.
Re^3: Building a Spidering Application
by Corion (Patriarch) on Jul 06, 2012 at 15:18 UTC

    Have you looked at the ->get method of WWW::Mechanize? In fact, you already use it yourself when loading the initial page. Maybe consider using it also when you want to download another page.

    You can also look at the ->follow_link method in the same documentation. But note that ->follow_link will only work for following one link on a page.