Just run it from the command-line. It's not meant to be run by your webserver. An added benefit from running it normally would be that you can see STDOUT and STDERR, and debug it from there.
In reply to Re: 'Premature end of script' errors running script as CGI
by rlucas
in thread 'Premature end of script' errors running script as CGI
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |