Hmm... buffering? Try adding $|++ to the beginning of your BEGIN block. Also, I don't know if there is any guarantee as to when a particular web server will actually send the output from a CGI script. Seems like it could differ. I use a little Perl-based web server that connects the STDOUT of the CGI scripts directly to the socket; others could buffer output themselves.