Hi after going over the FAQ and the examples I decided to write a
small script to understand the WWW::Mechanize module. Since Google has
one field and two buttons I thought this would be a straight forward
one. So I wrote the fallowing script. At the end of the script I
thought the script will fill up the Google search text box and give me
the search results but it didn't work. It will be a great help if
someone could take a look at it...

#!/usr/bin/perl

use WWW::Mechanize;

$queryString = 'HelloWorld';
$url = 'http://www.google.com/';
my $mechObject = WWW::Mechanize->new( autocheck => 1 );
$mechObject -> get($url);
print $mechObject -> content;

$mechObject->form_number(1);
$mechObject->field("q", $queryString);
$mechObject->click("btnG");

thanks inadvance,


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to