There's a couple ways to get around this.
There's suexec (it's an automatic cgiwrap). This will run all cgi programs and scripts under a given user and group. This way you can have all your scripts, programs, datafiles and stuff rw to that user.
If you're using mod_perl, you can't use suexec. suexec works only with mod_cgi spawned processes. You can run an apache process as a normal user, and use mod_proxy to push the requests back and forth.
If you're working under a hosted environment, things get a little hairier. Most likely the above two options will not be available to you. You're probably working with mod_cgi and everything runs as nobody, httpd, www-data or similar. You can work around this, chmod the parent directory 777 and have a script make all the directories you need apache to write to. Request that script in your browser. Then immediately chmod 711 the directory you just changed to 777. You'll now have your needed directories created and owned by the httpd process, you will be able to have your scripts write freely to these, without having world writable files and directories laying about.