I have this Perl script sitting in the cgi-bin folder of my Apache server:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
print \"Content-type: text/ht
To see if your script is working, try using a command line tool to avoid any confusion with your browser. curl
, for example, will output as soon as it receives data.
If what you are doing is for an important purpose, I wouldn't use your current approach, though. If the script takes a long time to run, fork it off into the background (info here) and update a file or database with progress. You can then use an auto-refreshing (JavaScript or META-REFRESH) iFrame to display the progress. You could also use AJAX, but that is a bit more involved.