clone4 has asked for the wisdom of the Perl Monks concerning the following question:
But now I need to aim specific string(e.g. <hr> random number<hr>) , and assign it to a variable.use LWP::UserAgent; use HTTP::Cookies; $ua = new LWP::UserAgent; $url = "http://www.google.com/"; print "$url\n"; $ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.8.1. +12) Gecko/2008020121 Firefox/2.0.0.12"); $request = new HTTP::Request ('GET',$url); $response = $ua->simple_request( $request +); if ($response->is_success) { print $request->as_string(); print $response->content; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Working with source of returned web page
by pc88mxer (Vicar) on Jun 09, 2008 at 19:49 UTC | |
by tachyon-II (Chaplain) on Jun 09, 2008 at 20:59 UTC | |
by clone4 (Sexton) on Jun 09, 2008 at 20:07 UTC | |
Re: Working with source of returned web page
by Popcorn Dave (Abbot) on Jun 10, 2008 at 03:30 UTC | |
by clone4 (Sexton) on Jun 10, 2008 at 20:39 UTC | |
by Popcorn Dave (Abbot) on Jun 10, 2008 at 22:48 UTC |