in reply to Re^2: DBD::mysql connections
in thread DBD::mysql connections

So what does Apache::DBI have to do with CGI? Sure Apache::DBI is specific to mod_perl, but the strategy applies to the OPs question.