Glad they say 'the only stupid question is the one not asked' because otherwise my questions would always win the prize
Of course. Just dont use mod_perl at all
So I set up a script dir via introducing a ScriptAlias... line in my httpd.conf and ran the test scripts there. It looks like my suspicions are correct - it runs every time without complaint under CGI.
So the next question is, what can I do now? Of course I don't want to have to work under CGI. Is there a way I can get mod_perl to flush its buffers? Or some way to get better visibility of what it is actually doing that is causing the problem?