1
2
3
4
5
6
7
8
9
#!/usr/bin/perl
use strict;
$|=1; # direkt ausgeben
print "Content-type: text/html\n\n";
print "TEXT1\n";
sleep(10);
print "TEXT2\n";
QuotePuffert Dein Webserver vielleicht? Pufferung im Webserver abschalten.
2012-10-16T11:01:37 hopWas muss ich machen, damit die Augabe in Echtzeit erfolgt ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#!/usr/bin/perl use strict; use warnings; my $text1 = << 'EOHTML'; <html> <head> <title>TEST WAIT</title> </head> <body> <p> EOHTML $text1 .= "TEXT_A_$_ \n" for(0..90); $text1 .= " </p>"; $text1 .= " <b>??????</b><hr>\n"; my $text2 = " <p>\n"; $text2 .= "TEXT_B_$_ \n" for(0..10); $text2 .= << 'EOHTML'; </p> <b>??????</b><hr> </body> </html> EOHTML $|=1; $text1=~s/\Q??????/sprintf('%06u',length($text1))/e; $text2=~s/\Q??????/sprintf('%06u',length($text2))/e; #print "Content-length: ".(length($text1)+length($text2))."\x0D\x0A"; print "Content-type: text/html\x0D\x0A"; print "\x0D\x0A"; print $text1; sleep(5); print $text2;