#!/usr/bin/perl $| = 1; print <<'END_HTML'; Content-type: text/html
Start. END_HTML sleep(5); print <<'END_HTML';
done.
END_HTML
## Start.
...waits 5 secs...
done.
## Start.
...waits 5 secs...
done.
Connection closed by foreign host.
##
$ foo.cgi
Content-type: text/html
##
$ telnet www.example.com 80
Trying 11.22.33.44...
Connected to www.example.com.
Escape character is '^]'.
GET /script.cgi HTTP/1.0
Host: www.example.com
HTTP/1.1 200 OK
Date: Mon, 17 Dec 2007 22:39:09 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
Vary: Accept-Encoding
Connection: close
Content-Type: text/html