Thanks alot David,
One issue I had before was that the html code taken from the site that I am running against of (http://www.ancestry.com/) is using
<input id="blabla"/> instead of <field name="blabla/>... How can we handle this issue. I tried the code that you submitted but I was getting a similar issue that I got before which was
There is no form with the requested fields at D:/PerlWorkSpace/Research/Genealogy/gen.pl line 226
Died at D:/Perl/lib/WWW/Mechanize.pm line 1715, <STDIN> line 1.