What still works is to have all domains using the same Perl and templates so, for example, instead of upgrading a Perl script in each of the domains, I only change it in one place.
Think about using modules to control your script processing.
use strict;
use CGI;
use CommonModule;
use HTML::Template;
my $q = CGI->new();
my $module = CommonModule->new(
form_data => $q;
);
my %templ_hash = $module->process_data();
my $template = HTML::Template->new(filename="$path/file.tmpl");
$template->param(%templ_hash);
print $q->header();
print $template->output();
exit;
This would be the basic form of your .cgi scripts in each domain which are unlikely to change.
Now any edits you do in the module or template will be applied to each domain.