why this code not working? Perl WWW::Mechanize question?

I have to paste the sequences into the box in http://www.expasy.org/tools/protscale.html and I have to save the result page. So I wrote this perl code which is always retrieve the same page when I change the number in the form_number. How can I fix it?
use strict;
use WWW::Mechanize;
my $url = "http://us.expasy.org/tools/protscale.html";
my $searchstring = "GSHMLEDPVVLQRRDWENPGVTQLNRLAA";
my $outfile = "out.htm";
my $mech = WWW::Mechanize->new();
$mech->get($url);
$mech->form_number(3);
$mech->field(query => "$searchstring");
$mech->click();
my $output_page = $mech->content();
open(OUTFILE, ">$outfile");
print OUTFILE "$output_page";
close(OUTFILE);
***************************************************************************************************************************************************
thnx Martinthurn. But there are three forms, the first one is on top right. Also when I put 8 instead of 2 it also returns the same value
 
Back
Top