# Create User Agent my $ua = LWP::UserAgent->new(timeout => 30, keep_alive => 10); # Use a proxy server if configured for normal HTTP $ua->proxy (['http'], $ProxyUrl) if $ProxyUrl; # Add Env var for Crypt::SSLeay $ENV{HTTPS_PROXY} = $ProxyUrl) if $ProxyUrl;