Nakamura, Hisashi wrote:

> Hi,
> 
> I'm trying to get an HTML file from a remote web server using ActivePerl
> script on Windows/NT.
> I have installed the latest version perl5.6.1.631-MSWin32-x86.msi.
> 
> To begin with, I tested the following script which I found in the online
> help.
> 
> use Win32::Internet;
> $INET = new Win32::Internet();
> $file = $INET->FetchURL("http://www.yahoo.com";);
> 
> The result was OK.
> 
> Next, I tried the following script.
> 
> use Win32::Internet;
> $INET = new Win32::Internet();
> $URL = $INET->OpenURL("http://www.yahoo.com";);
> $file = $URL->ReadFile();
> $URL->Close;
> 
> As s result, I got the message "Can't call method "ReadFile" on an undefined
> value at .....".
> 
> Finally, I tried the following script.
> 
> use Win32::Internet;
> $INET = new Win32::Internet();
> $HTTP = $INET->HTTP("http://www.yahoo.com";, "anonymous",
> "[EMAIL PROTECTED]");
> ($statuscode, $headers, $file) = $HTTP->Request("/");
> $HTTP->Close;
> 
> As a result,  I got the message "Can't call method "Request" without a
> pakcage or object reference at .....".
> 
> I suspsect some modules or packages are missing in my installtion.
> I tried to find them using PPM, but I can't identify which packages I should
> install.
> Any idea as to what I should do?


I would try the more portable and comprehensive LWP modules.  There 

is an LWP cookbook pod that comes with and you can start with LWP::Simple
before you get into the more esoteric things it can do.

It's part of the libwww-perl bundle I believe and may be part of
the standard AS distro these days.


One thing you should be doing is checking the result of your calls
like OpenURL to make sure they are succeeding.

-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to