When running under mod_perl, multiple calls through SSI are very efficient. When using CGI, they are not. So, if you have to stick with CGI, use the "everything from one Perl script" approach. If you can use mod_perl, the SSI approach would be my first choice, although either way can work.