Yes it only last for one request as I'm using CGI. If I were using mod_perl I believe there is a module that would take care of this, and it would overwrite (dis)connect calls. So I could call it 10 times - and no new connection would be made?
You're thinking of Apache::DBI. However, if you keep the connection open long enough, the server will break it. That will result in Apache::DBI reconnecting, and that would mean any copies of the old $dbh you have sitting around will not work.