2012-05-15 57 views
1

嗨此腳本服用3 * 2秒的時間,然後打印在一次瀏覽器的輸出,幫助重新註冊:的Perl CGI腳本自動更新使用新的數據

#!C:/perl/bin/perl.exe 
use warnings; 
use strict; 
use CGI; 

my $cgi = new CGI; 
print $cgi->header(); 
print $cgi->start_html("First"); 
print $cgi->h1("First"); 
sleep(2); 
print $cgi->h1("Second"); 
sleep(2); 
print $cgi->h1("Third"); 
print $cgi->end_html(); 
+0

可能的重複[如何從Apache 2提供無緩衝的CGI內容?](http://stackoverflow.com/questions/1181135/how-can-i-serve-unbuffered-cgi-content-from-apache- 2) – Quentin

+0

重複http://stackoverflow.com/questions/10600495/how-to-write-a-perl-cgi-script-which-keeps-on-flushing-with-current-time-in-the由同樣的OP。 –

+0

請停止使用骯髒的舊CGI.pm.改用現代和乾淨的網絡引擎,例如[舞者](http://www.perldancer.org/)或[Mojolicious](http://mojolicious.org/)。 – dolmen

回答