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

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

Replies are listed 'Best First'.
Re: Problem Submitting HTML Form with User ID/Password
by tlm (Prior) on Apr 17, 2005 at 21:42 UTC
      Sorry about the Code Tag, missed that part. I will look at the Mechanize Module. Looks like what I need. Thank You