Yes, as ikegami says, what you need (if you're not going the AJAX route) is an NPH script (stands for "No Parse Head"). I took a look at the documentation pointed to in the link above (to the NPH scripts section of the CGI.pm docs), and one of the things it doesn't mention is how and NPH script solves your problem. Most web servers will normally gather all the output together, attach headers, and then send the headers and contents to the client. You don't see anything until all the data is produced by the CGI. With NPH, the web server doesn't take on that responsibility, and in that situation it serves up data as it gets it from the CGI. If your web page has content which can be displayed as-you-go, it does.
One thing to not miss in the docs. On some web servers, the script has to start with the string "nph-". It's most awkward, but on those servers there is no way around it.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.