in reply to mod_perl and CGI behavior
Theres a few problems here, but the most glaring one is you're printing your script's output to STDERR. Where did you get this pattern?