LWP Help please

2009-05-17 Thread steve silvers
I have looked over the LWP documentation but still have trouble putting the pieces together. Can someone give me a snippet that shows me how to query google for something, and display the results. The examples only show how to match on something and just print that out. How do I display the

Re: LWP Help please

2009-05-17 Thread Aaron Hawryluk
use LWP::UserAgent; my $ua = new LWP::UserAgent; my $url = http://www.google.ca/search?q=perl+lwp+tutorial;; my $response = $ua-get($url); if($response-content_type ne text/html){ die(Recieved content-type .$response-content_type., was looking for text/html.) } my $content =