in reply to Re: Re: LWP::Simple setting a proxy
in thread LWP::Simple setting a proxy

I bet that LWP::Simple's internal UserAgent gets created at use time, so your env variable definition is not seen.

Just guessing (untested)... either put your env-var setting inside a BEGIN block before the use:

BEGIN { $ENV{HTTP_proxy}="http://10.2.7.11:8080" } use LWP::Simple;
or you can always go "behind the scenes" with LWP::Simple by accessing $LWP::Simple::ua:
use LWP::Simple qw($ua); $ua->proxy([qw(http ftp)], 'http://10.2.7.11:8080');

-- Randal L. Schwartz, Perl hacker