This is my first post here. I have looked around and have not found what I seek. I am doing my first serious Perl Script - but have a long background in C/C++/Java/Unix/Windows.

The Assignment: I am trying to automatically load Product Updates to Amazon - through their Secure Server.

My Problem: I have submitted the Form but without success. When I look at the returned contents, the HTML Password Field does not appear to be set. This may be more of an HTML question, but Perl Studs seem to know most related technologies.

NOTES:
- The User Id & Password have been changed, to protect the innocent.
- The Password field is of type 'Password' in HTML. (Important?)

Additional Question: Will the Perl HTTP::Request object/structure automatically move to the next HTML page, if the Submitted Form works?

The Code In Question: Hope it is okay to post it, rather than attach it...
#!C:/Perl/bin/perl.exe use HTTP::Request::Common qw(POST); use HTML::Form; # Not neccessary? use LWP; # # Redirect Standard Output at times # # open STDOUT, ">/Perl/output.txt"; #open STDERR, ">/Perl/error.txt"; $browser = LWP::UserAgent->new; # # Establish an HTTP Request to form work with the Amazon website # # $amazon_login_url = 'https://secure.amazon.com/exec/panama/seller-admi +n/catalog-upload/catalog-upload-now?fmt=tab-delimited'; $http_request= POST $amazon_login_url, 'login_id'=> 'MyId', 'login_pas +sword' => 'MyPassword' ; # # Must install Crypt::SSLeay to use Secure Socket Layers (SSL) # # # Need to turn on Cookies to use Amazon's SSL Web Page $browser->cookie_jar({}); # The following will get a copy of the Amazon Source. $response = $bro +wser->request ($http_request); # Print out the Web Page HTML code print $response->as_string;

Janitored by Arunbear - added code tags, as per Monastery guidelines


In reply to Problem Submitting HTML Form with User ID/Password by NYPoke

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.