in reply to Executing / Retrieving Output from Command
Maybe something in here can help: Troubleshooting Perl CGI scripts