http://www.perlmonks.org?node_id=882412


in reply to Don't reprint header

You are asking the wrong question. Checking a log file on the server at this point is like talking and then stopping in mid sentence to ask yourself what you had already said earlier in the sentence.

The browser can ask your server for information and then your server can send a response. You are responsible for building up a complete response without any additional feedback from the browser (which isn't available anyway).

What you are talking about is building up this response from various scripts. If you don't have control over the whole process, then you need to talk to whoever does have control over it so that you can coordinate.

UPDATED