Ok, so this isn't strictly an answer to your question, as merlyn seems to have done that, but...
Did you know that you can start static fcgi applications with cgi-fcgi? (Comes with mod_fcgi.) You'll just have to give a server and port in the apache config file to point to your app. This lets you start it on a tty and see any startup errors.
You can also point your stderr anywhere you want after the script starts with open STDERR, ">>logfile"; select( (select(STDERR), $|=1)[0]);. This also sets stderr to unbuffered output, but may be superfluous. It might also be helpful to do this after the accept, then close at the end of the loop, so you can move aside large log files.
It's very helpful for daemons / cgi to log everything. This will help to pinpoint problems, and disk space is usually cheaper than programmer time.