in reply to cgi buffer flush
note the "\r\n\r\n" can be safely written as "\n\n" as perl will convert them when you are on windows. Thus making your code more portable.
to flush to buffer, just put $|++ in the head of your script. Offcourse, if you really want the text to appear after 10 seconds i'd use javascript.
In Section
Seekers of Perl Wisdom