Ovid has an excellent web programming with perl tutorial. That should get you started with writing a CGI to control another program. Since it sounds like you may be interacting with the shell pay attention to lesson 3.
Comment on Re: How do I make a Web interface for the 'makehtml' command line tool?