in reply to LWP posting

Try WWW::Mechanize: it's easier to use when you need to emulate a browser and sequentally fetch pages from different forms, saving cookies and other session-related parameters between calls. It also contains a handy utility calles mech-dump which will help you to fill the form properly.