Randy,
I added the proxy setting in the script, but still the same problem.  I
saved the xml link as a local file and ran the script through IE.
Parsed just fine.  Still can't figure out why it won't get the xml from
any site.

David 

-----Original Message-----
From: Randy Kobes [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 17, 2005 4:22 PM
To: Hsu, David
Cc: $Bill Luebkert; [email protected]
Subject: RE: LWP::Simple could not retrieve issue

On Mon, 17 Jan 2005, Hsu, David wrote:

>  Bill,
> I tried your code, but get same problem.  I'm behind a corporate
> firewall, does LWP::Simple require any proxy settings?  I've already
set
> the proxy server on the systems variables.

Perhaps you need to include some proxy settings in the
script itself, as in:

====================================================================
use strict;
use LWP::Simple qw(get $ua);

my $arg = "http://www.infoworld.com/rss/news.xml";;

if ($ENV{HTTP_proxy_user} and $ENV{HTTP_proxy_pass}
    and $ENV{HTTP_proxy} =~ /^http:\/\/([EMAIL PROTECTED])$/) {
       my $proxy ="http://$ENV{HTTP_proxy_user}:$ENV{HTTP_proxy_pass}\@";
. $1;
       print "setting user/pass into proxy_env...\n";
       $ua->proxy(['http'], $proxy);
}

if ($arg=~ /http:/i) {
     my $content = get($arg);
     die "Could not retrieve $arg" unless $content;     ### line 38
     print $content;
}

========================================================================

-- 
best regards,
randy


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to