This isn't actually a perl question, but I'll bite.
There are a few ways of doing this, modern Apache
comes with suEXEC.
There are also third-party modules to accomplish
similar things with wider scope (eg; for static content
as well, beware that for the latter you have to compile
Apache with -DBIG_SECURITY_HOLE and run it as root).