Is there a way to print stuff to the browser immediately?
Without seeing your code - it's difficult to tell what may be happening, but the first thing that comes to mind is to ask whether you explicitly set the CGI Perl script to not buffer STDOUT (by default, it is buffered)