in reply to Re: LWP and Google
in thread LWP and Google

I prefer to use the submit_form() method. Also, you need to check for errors, either manually or by setting autocheck.
#!/usr/bin/perl use strict; use WWW::Mechanize; my $browser = WWW::Mechanize->new( autocheck=>1 ); $browser->get('http://www.google.com'); $browser->submit_form( form_name => 'f', fields => { q => 'langley public library', }, ); print $browser->content();

xoxo,
Andy