LWP::Simple::get returns undef for some Web pages

dave_nul_at_hotmail.com
Date: 12/26/04


Date: 26 Dec 2004 11:54:46 -0800

I'm trying to write a sub that can get all sorts of Web pages, and find
that LWP::Simple::get works well for most non-authenticated pages, but
not for all. Below is some sample code to illustrate. Any ideas on
why the first get() fails to return anything but undef?

use LWP::Simple qw( get );

## Example of page for which LWP::Simple::get returns undef. Using
## LWP::UserAgent does not work, either. Nor does
## "use LWP::Simple qw( get $ua );". Those last two ideas are from
## suggestions in newsgroup postings.
print get( 'http://www.worldtimeserver.com/time.aspx?locationid=UTC') .
"\n";

## ASP is not the problem, because this works.
print get(
'http://www.bulova.com/brands/bulova/collections.aspx?id=22&gender_id=1'
) . "\n";



Relevant Pages

  • Re: Wscript within VBA
    ... It posts a form to an ASP page, ... Since what you want to do sounds like it will require admin privileges, ... server to impersonate an admin account. ... >> Exit Sub ...
    (microsoft.public.vb.database)
  • Procedures dont have access to public Variables in ASP
    ... The problem is when running in ASP ... my .vbs file which is on the server using wscript or cscript all is fine. ... The only difference is the QuitOnError() procedure. ... sub SendEmail ...
    (microsoft.public.scripting.vbscript)
  • Re: Help w/code
    ... little more difficult--including sorts, pivottables, charts, subtotals.... ... Sub testme() ... Dim myRng As Range ...
    (microsoft.public.excel.programming)
  • Re: Redirecting web pages
    ... processor only processes ASP code if the extension is .asp. ... since they are included in .asp files, are not required to be .asp files so ... Response.Writeend sub ...
    (microsoft.public.scripting.vbscript)
  • Re: saving current asp to server
    ... there isn't any functionality in ASP like: ... Response.Writing the .ResponseText, write the ResponseText into a file. ... > I got a very nice reply back from Scott McNair. ... > Sub Write ...
    (microsoft.public.inetserver.asp.general)

Loading