in reply to Debugging CGI

You need to print the return value of almost all CGI methods you call. If you do that, though, you'll notice you're printing two headers.

If you use strict at the top, you'll run into a lot of bareword errors, so look at what you're passing to execute. You'll also have to declare several variables. Of course, the benefit is that once you fix those errors, you'll have better protection against typos.