http://qs321.pair.com?node_id=47691


in reply to Getting External HTML

When you say: $url is defined in the URL of the script (i.e. script.pl?url=http://www.blah.com) do you mean that the value of the variable $url is:
$url="script.pl?url=http://www.blah.com";

Because in that case the URL you are giving may be relative to the server you are working from, which explains why it would work on one server and not the another.
If so, it is simply a matter of giving the full url, starting with http://

If that doesn't fix it, try the more robust LWP::UserAgent. This awesome module is described very well in the awesome book, Web Client Programming With Perl. Which is out of print, but available online at http://www.oreilly.com/openbook/webclient/
Major props to Oreilly for open sourcing their out of print books!