in reply to Can I print to STDOUT in mod_perl cleanup_register code?

Are you trying to send something to the client? I think $r->pool is only freed at the end of the request, so your handler is being called after the content is already sent. The docs indicate $c->pool->cleanup_register should be used "to run a cleanup at the end of each connection phase":

use Apache::Connection (); use APR::Pool (); $c->pool->cleanup_register(\&my_cleanup);

Maybe you'll have better luck if you asked this question on the mod_perl mailing list.