Randy Kobes wrote:

> 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.

I've never had to use a proxy, so I can't test any proxy code.  That being said,
LWP::Simple has logic to grep %ENV for 'http_proxy' and then to use 
$ua->env_proxy
to accomodate it.  Having $ua on the use/import line (as below) should also turn
this on.

> 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])$/) {

That's worth a try.

>        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;
> }
> 
> ========================================================================
> 


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to