in reply to automated search using perl

How is WWW::Mechanize failing for you? Alternatively to ->forms() try ->dump_forms(). Also see Google's Terms Of Service, which likely prohibit using WWW::Mechanize or anything like it to scrape its results.