in reply to Apache piping to perl

Chances are that you write print $filehandle, $content; instead of print $filehandle $content;.

But we can't know for sure without seeing any code.