Amoe has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use warnings; use Getopt::Std; use LWP::UserAgent; my $agent = LWP::UserAgent->new(); my %switches; getopts('p:', \%switches); if (exists($switches{p})) { if ($switches{p}) { $agent->proxy('http', $switches{p}); } else { $agent->env_proxy(); } } print "Agent proxy is now ".$agent->proxy;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Setting LWP::UserAgent proxy
by projekt21 (Friar) on Sep 26, 2001 at 19:50 UTC |