#!/bin/sh echo "Content-type: text/plain"; echo for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do echo "Value is $i"; sleep 1; done #### #!/usr/bin/perl -w $|=1; use CGI qw/:standard/; { my $cgi = CGI->new; print $cgi->header('text/plain'); print "Autoflush is currently ".($|?"on":"off").".\n"; for ( 1..5 ) { print "Value is $_.\n"; sleep 1; } print "Autoflush is currently ".($|?"on":"off").".\n"; } #### #!/usr/bin/perl -w $|=1; use CGI qw/:standard/; { my $cgi = CGI->new; print $cgi->header('text/html'); print pre("Autoflush is currently " . ($|?"on":"off") ); for ( 1..5 ) { print pre("Value is $_."); sleep 1; } print pre("Autoflush is currently " . ($|?"on":"off") ); }