Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
How can i make this CODE print just like terminal does ??
#!/usr/bin/perl -w use strict; print "Content-type: text/html\n\n"; my $i = 0; while($i < 10){ print "$i\n"; sleep(5); $i++; }
in the terminal it will print a number every 5 seconds .. but in the browser it will wait till the time ends then print all the numbers in the same time
Any help? Thanks so much.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing Like Terminal Does
by halley (Prior) on Sep 15, 2005 at 14:26 UTC | |
|
Re: Printing Like Terminal Does
by Roy Johnson (Monsignor) on Sep 15, 2005 at 14:42 UTC | |
by Opalenet (Acolyte) on Sep 15, 2005 at 14:47 UTC | |
by Roy Johnson (Monsignor) on Sep 15, 2005 at 14:57 UTC | |
|
Re: Printing Like Terminal Does
by PreferredUserName (Pilgrim) on Sep 15, 2005 at 15:13 UTC | |
|
Re: Printing Like Terminal Does
by ChrisR (Hermit) on Sep 15, 2005 at 14:13 UTC |