CGI Std Output and Input -- Please Help

I am currently building a web server in Delphi 3 C/S. The server will
have to 'call' external CGI scripts, primarily Perl scripts. Here's my
problem:

- How to I pass parameters to the Perl script (I know that I have to put
them in the environment varialbes - but how?)

- How do I execute the Perl script?

- How do I read the Perl output (I know that Perl outputs to Standard
Output, but how do I pipe it back to my server?)

Thanks in advance

Raju