in reply to exec launch

It what way does it not work? Your post is very light on details, so our assistance will be very general and vague. Perhaps you should show the broken code.

Do you realize that the exec function never returns when successful? In contrast, the system function returns. Furthermore, the backticks (`...`, qx/.../) operator returns and capture STDOUT. open("|..."), open("...|") and IPC::Run provide means of executing another application in parallel.

Is program1.cgi really a CGI program? If not, why not rename it to program1.pl. If it is, you need to call it as a CGI program (which means you need to send the POST data to program1's STDIN).