Re: [Perl-unix-users] How to captures a web pages in a variable

2003-02-26 Thread Anthony Ettinger
Sorry, I didn't look at my code closely enough. Here's the solution that should work for you (i was using a proxy server to send the request). sub httpRequest { my $get_url = shift; my $ua = LWP::UserAgent->new(timeout => 5); $ua->agent("Some User Agent"); #not necessary

Re: [Perl-unix-users] How to captures a web pages in a variable

2003-02-26 Thread Anthony Ettinger
use LWP::UserAgent use HTTP::Request $proxy = $url; #or just replace $proxy with $url. my $response = &httpRequest($proxy); sub httpRequest { my $proxy = shift; my $ua = LWP::UserAgent->new(timeout => 2); $ua->agent("Anti-War v2.0"); $ua->proxy('http', "http://