Hello, I am trying to use the post method implemented in perl. The website is : http://enm.lobos.nih.gov/start.html its contents contain:
<FORM ENCTYPE="multipart/form-data" ACTION="prep_job.php" METHOD="POST +"> <INPUT TYPE="HIDDEN" NAME="TASK" VALUE="NEW"> <INPUT TYPE="FILE" NAME="UPLOAD" SIZE=20> <INPUT TYPE="TEXT" NAME="JOBNAME" SIZE=4 MAXLENGTH="4"> <br> <br> <INPUT TYPE="RADIO" NAME="CASE" VALUE="1"> <INPUT TYPE="RADIO" NAME="CASE" VALUE="2"> <INPUT TYPE="RADIO" NAME="CASE" VALUE="3"> <INPUT TYPE="FILE" NAME="UPLOAD2" SIZE=20> <br><BR> <B>E-mail </B> <INPUT TYPE="TEXT" NAME="EMAIL" SIZE=40> <br>< +br> <input type="checkbox" value="true" name="optin"> <INPUT TYPE="submit" VALUE="submit my job">
and I want to post data in my program
#!/usr/bin/perl -w use strict; use LWP::UserAgent; my $browser = LWP::UserAgent->new; my $response = $browser->post( 'http://enm.lobos.nih.gov/start.html', [ "upload"=> ["C:\\protean\\1o1l\\1o1l.pdb"], "jobname"=> "PRT1", "case" => "2", "email" => "email\@gmail.com", "optin" => "true", "upload2"=> ["C:\\protean\\1o1l\\1o1l.pdb"], ], 'Content_Type' => 'form-data', ); die "Error: ", $response->status_line unless $response->is_success; print $response->content; exit;
However when I do this instead of turning a result page like this; http://enm.lobos.nih.gov/success.php?jobno=36439947 it returns the original page as the content. What might be the problem? Does have to do with the code or the website? Thanks

In reply to Problem Using POST by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.