If you are using Perl in a web application under mod_perl, then the answer is different: in that case, due to the beauty of a module called Apache::DBI, the connection will be cached automatically for you, even if you do not explicitly call connect_cached. If you look under the documentation for Apache::DBI you'll see the full explanation.