#!./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.3 1996/10/30 14:38:27 mbrown 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",
          "<title>FastCGI Hello! (Perl)</title>\n",
          "<h1>FastCGI Hello! (Perl)</h1>\n",
          "Request number ", ++$count,
          " running on host <i>$ENV{'SERVER_NAME'}</i>\n");
}
