in reply to Re^4: Correct link to put in my WWW:Mechanize
in thread Correct link to put in my WWW:Mechanize

> Sorry Rolf, I am a bit confused. In my script, I write:
'my $url = 'http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/';'

That's not the code you showed us.

> and, in the source of the page I see:
<form name="myform" action="/cgi-bin/MEMBRAIN.cgi" method="post" onSubmit="javascript: return checkform();">

you are confusing two things:

  1. the static page you open in your browser to see the form
  2. the CGI you can submit your form parameters to.
Which one do you want to mechanize? I can't tell.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^6: Correct link to put in my WWW:Mechanize
by Anonymous Monk on Mar 12, 2022 at 19:09 UTC
    I guess this is where I am confused, as to what do I need to specify in the URL so I can force the page to run using my data. I thought it was enough to put:
    my $url = 'http://www.csbio.sjtu.edu.cn/bioinf/MemBrain/'; my $mech = WWW::Mechanize->new (timeout=>1000); $mech->post($url); #$mech->get($url);

    but it fails to run with the error: Error POSTing http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi: Internal Server Error or Error GETing http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi: Internal Server Error
    I even tried: my $url=http://www.csbio.sjtu.edu.cn/cgi-bin/MEMBRAIN.cgi, still error...