in reply to Pass cookies from one CGI to another

So you're loading perl CGI A which is pulling in page B containing a form, filling in the values, and submitting it, getting returned page C, which wants to redirect you to page D, and page D wants to set a cookie? And you want the script to hand back page D, correct?

One problem I can see potentially is that when you return page D to the browser, it may try to set cookies again. I might be wrong in this, though.

I haven't played much with writing web-clients in perl (although an upcoming project made this catch my eye), but sounds like what you need to do send the Cookie: param=value header (perhaps using the HTTP::Request module) for each parameter the server is setting/expecting a cookie value to be returned. Otherwise, the page you are going to is trying to set that value.

You might also refer to Clinton Wong's Web Client Programming with Perl (although for some reason I can no longer seem to find it mentioned on O'Reilly's website.

I would be very interested in how you resolve this, and I hope monks of more experience than I who have worked with this will chime in so we both may drink of the wisdom of how to accomplish this.