use LWP::Simple;
use LWP::Simple qw( $ua get );
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
my $ua = new LWP::UserAgent;
$proxy = "72.43.50.184:80";
$contentget = "http://search.cpan.org/~gaas/libwww-perl-5.837/lib/LWP/UserAgent.pm";
$ua->timeout(3);
$ua->proxy(['http'], '$proxy');
my $req = new HTTP::Request GET => '$contentget';
my $res = $ua->request($req);
if ($res->is_success)
{
$content= $res->content;
}
else
{
die "Could not get content";
}
####
Could not get content at C:\CC\BUY\ptest.pl line 22.
####
$ua->proxy( 'http', $subproxy );my $content = get( $contentget )
####
use LWP::Simple;
use LWP::Simple qw( $ua get );
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use HTTP::Request
my $ua = new LWP::UserAgent;
$proxy='http://72.43.50.184:80/';
$contentget = "http://search.cpan.org/~gaas/libwww-perl-5.837/lib/LWP/UserAgent.pm";
$ua->timeout(3);
$ua->proxy(['http'], $proxy);
my $req = new HTTP::Request GET => '$contentget';
my $res = $ua->request($req);
if ($res->is_success)
{
$content= $res->content;
}
else
{
die "Could not get content";
}
# ptest.pl
####
C:\CC\BUY>ptest.pl
Backslash found where operator expected at C:\CC\BUY\ptest.pl line 30, near "CC\"
Backslash found where operator expected at C:\CC\BUY\ptest.pl line 30, near "BUY\"
syntax error at C:\CC\BUY\ptest.pl line 30, near "Could not "
Execution of C:\CC\BUY\ptest.pl aborted due to compilation errors.