This looks like a mod of some code I posted
here. On the surface, I don't see anything wrong with your code, except for the fact that those URL's don't exist (at least not at the momnet for me). Do you have all the modules installed?
LWP::Simple;
HTML::TokeParser;
HTML::Entities;
Also, when I posted this code, I was running the script against domains w/o subdomains as you have here. I split on /\./ to get the domain, you will only get the subdomian.
-Silent11