in reply to CGI and HTML form
Concuring with davidrw, combining the scripts into one is probably the easiest method.
If, however, you need to keep seperate scripts, take a look at LWP::UserAgent