The example given in the node above yours did mostly that. Set $URL to the URL that sets the cookie, and the LWP stuff will request it via a user agent of its own, noting the cookies and saving them for future reference. Follow up that example code with code that actually posts your form.
See the documentation for the LWP::UserAgent and, say, HTTP::Request stuff.. examples are extensive. | [reply] [d/l] |