This reply may reflect the writer's seriously
under-cafeinated condition, but, IMO, you'll likely do well by:
- familiarizing yourself with just how subdomains work (cf: "virtual host").
See http://httpd.apache.org/docs/2.0/vhosts/examples.html.
and
such terms as "mod_proxy" or "AliasMatch"
and/or
- clarifying your question;
- ascertaining whether this is actually a Perl-related issue;
- specifying the circumstances in which you expect (I gather) to call a script in root's cgi-bin from <edit> one or more</edit> subdomains.