#!/usr/local/bin/perl
#Doesn't display because of the missing &lt;br&gt; after $date

$|=1;
$BOUNDARY="-------------------foobar----------------------";

print <<HEADER;
Status: 200 OK
Server: $ENV{SERVER_SOFTWARE} / foobar
Content-type: multipart/x-mixed-replace; boundary=$BOUNDARY

HEADER
  ;

while(1)
{
	$date=`/bin/date`;
	print "$BOUNDARY\n";
	print "Content-type: text/html\n\n";
	print <<END;
	<HTML><head><title></title></head>
	<BODY BGCOLOR=white>
	$date
	</BODY></HTML>
END
    ;	
	sleep(5);
}

