I have seen similar behavior (getting all output on STDERR instead of STDOUT) when moving to mod_perl/apache 2.
This was some time (talk 3-4 months at least) ago, and was somehow related to a change perlio interface in newer perls.
I'm probably not much of a help to you, but maybe it's a pointer for you.
regards,
janx