nurulnad has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to populate the 'pdbid' and 'address1' fields at http://ekhidna.biocenter.helsinki.fi/dali_server/ and then submit it. However it returns an internal server error at $mech->click_button( value => "submit" ), and I'm wondering if something is wrong with my code? Any help at all is really appreciated.
#!/usr/bin/perl use warnings; use WWW::Mechanize; $url = "http://ekhidna.biocenter.helsinki.fi/dali_server/"; my $mech = WWW::Mechanize->new(); $mech->get( $url ); if($mech->success){print "successfully get url\n"}; $mech->form_name( 'gosolvx' ); if($mech->success){print "successfully obtain form\n"}; $mech->field( 'pdbid', '1BH6'); $mech->field( 'address1', 'someemail@mail.com'); $mech->click_button( value => "submit" );

Replies are listed 'Best First'.
Re: www::mechanize form returns an internal server error
by Corion (Patriarch) on Nov 02, 2010 at 08:02 UTC

    internal server error is an HTTP error returned by the remote side. So you are not doing what the browser is doing. Verify that you are sending identical data.

    Also, as you seem to be doing bioinformatics stuff, have a look at http://bioperl.net/index.php/Main_Page, which has lots of Perl applications and modules geared towards use with common bioinformatics tools.