I'm trying to create a small web client that will
send a post request, although the code runs fine on
both PC and UNIX, it receives no response at all on a MAC. I have tested on two MACS, a PPC(Performa 6320) running MacOS 8.1, and a G3 running MacOS 8.5. Both run Web Sharing and MacPerl v5.004 set to 8MB of memory. I have updated all the modules used, ie. LibWWW v5.44, URI v1.03, and the Mac port of MIME v2.11. Does anybody know why this does not work, or have
any suggestions of how make it work ?
require LWP::UserAgent; require HTTP::Request; $url = "http://194.242.130.251:80/";
$ua = new LWP::UserAgent; $request = new HTTP::Request 'GET',
$url;
$response = $ua->request($request); if ($response ->is_success) {$gotit =
$response->content();print "Content-Type: text/html\n\n$gotit"}
else {print "Content-Type: text/html\n\nThis script has malfunctioned!"}; I have tried the URL as an IP and as localhost, both with and without the port number, but it made no difference. Any help or suggestions will be much appreciated - Julian. |