in reply to Scraping a website

# check each hypertext link within page my @html = split(/a href=/, $html);

A recommendation: you are doing a lot of extra work to collect URLs and save the relative content, the code is a bit verbose and you could still miss something; peruse "standard" tools to help yourself:

  1. HTML::LinkExtor - Extract links from an HTML document
  2. LWP::UserAgent - Web user agent class - look at its get(...) method and in particular to its :content_file => $filename parameter

This should simplify things and help a lot