There is a very useful example LWP script in the llama book
which shows how to get a list of all the URLs in a page
and download each URL. If you can to save them to a file
rather than getting them in a var, you can use getstore
(is this in LWP::Simple, anyone?). Getstore is trivial to
use, just do
getstore($url, $local_file);.
I used the example code in the llama book as the base of
one of my scripts, it was nearly worth the price of the
book in itself (note to O'Reilly though: please don't
jack the prices up any more!).
what if i don't want to use modules, as in pure perl? can this be done?
As far as I know, LWP is written in Perl, so your script would be "pure Perl" ::grin::.