I'm trying to simulate a login to a web page through a perl script. I'm using LWP::UserAgent, HTTP::Cookies, and HTTP::Request. The problem is that the login for the web site occurs in two phases (two separate web pages). In the first phase you enter in your username and password info and the second phase you select where you want to be redirected. I can get the redirection page just fine (in other words, my perl script handles the login and password page just fine - also I can get to other restricted pages on the site so I know that the perl script is handling the login page correctly).
The problem with the second web page (where the user selects where he wants to be redirected) is that there are about 30 hidden form fields on the page that are submitted when you click the submit button. My perl script needs to be able to pass these hidden form fields and there values to the server. Is there any efficient way (using CGI.pm or some module like that) that would grab all form data and allow me to just pass it through?
Thanks.