#!./perl # # tiny-perl-fcgi -- # # Perl-5 FastCGI example program # # Copyright (c) 1996 Open Market, Inc. # # See the file "LICENSE.TERMS" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # $Id: tiny-perl-fcgi,v 1.1 1997/09/16 15:36:29 stanleyg Exp $ # use FCGI; # # Work around the "empty initial environment" bug # while (($ignore) = each %ENV) { } $count = 0; while(FCGI::accept() >= 0) { print("Content-type: text/html\r\n\r\n", "FastCGI Hello! (Perl)\n", "

FastCGI Hello! (Perl)

\n", "Request number ", ++$count, " running on host $ENV{'SERVER_NAME'}\n"); }