Definitely agree - you're going way too low-level and making lots of extra work for yourself.
Notes:
Make sure you obey robots.txt. libwww-perl will give you the necessary tools for this.
Make sure your crawler is polite and doesn't hammer the site to death, fetching pages as fast as it can. Add a short sleep() - even 1 second - between pages.