in reply to Automating Web Forms with a POST method

I think you're asking how to make a perl script pretend it's you sitting at a web browser, typing input by hand, clicking submit, and saving the resulting page somewhere.

If that's the case, I think everything you need is in the libwww-perl bundle from CPAN. First, take a look at the HTML source for the form. Make yourself an LWP::UserAgent, put together an HTTP::Request with the URL from the form's action parameter and the appropriate content for the form's fields. CGI.pm can help you properly encode your form data. Grab the text you want from the response (HTTP::Response), and save it off to a file. Loop over a data file containing the data you want to process, appending each response to your output file.

  • Comment on Re: Automating Web Forms with a POST method