#!/bin/sh -x printf "Content-type: text/plain\n\n" exec 2>&1 ./your_script.cgi echo "Exit status: $?" #### #!/usr/bin/perl -w use strict; print "Content-type: text/html\n\nThis is a CGI script.\n";