求助WWW::Mechanize:多个form提交问题

求助WWW::Mechanize:多个form提交问题



[Copy to clipboard] [ - ]
CODE:
my $url='http://babelomics.bioinfo.cipf.es/fatigoplus/cgi-bin/fatigoplus.cgi';
my $mech=new WWW::Mechanize;
$mech->get($url);
$mech->submit_form(
  form_number=>'2',
  #form_name=>'fat_search',
  fields => {
   database=>'hsa',
   list1=>$ref,
   biological_process=>'yes',
   molecular_function=>'yes',
   cellular_component=>'yes',
   action=>'Run',
  }
);
$mech->click();
print O $mech->content;

网页中有三个form,我需要填第二个表格,但是返回的却是按照第三个表格填的结果。
请大侠支招!
http://bbs.chinaunix.net/viewthread.php?tid=991049&extra=page%3D1%26amp%3Bfilter%3Ddigest
问题解决了!多谢精华贴!

[Copy to clipboard] [ - ]
CODE:
       
my $url='http://babelomics.bioinfo.cipf.es/fatigoplus/cgi-bin/fatigoplus.cgi';
        my $mech=new WWW::Mechanize;
        $mech->get($url);
        $mech->form_name('fat_search');
        my %field_values=(
                database=>'hsa',
                list1=>$ref,       
                biological_process=>'yes',
                molecular_function=>'yes',
                cellular_component=>'yes',
                action=>'Run',
        );
        $mech->set_fields(%field_values);
        $mech->click();
        print O $mech->content;

呵呵