Check the perlfaq for info on unbuffering STDOUT. You also need to find out what buffering your server does, if any. You may find the CGI.pm documentation helpful for this as well.
You might want to look into using Apache::ASP, if you're comfortable with the ASP paradigm.
Comment on Re: (CGI) ASP-like response buffer control