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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to