You can't serialize database handles. They are wrappers around C libraries and contain C structures and open sockets. To get persistent database connections, you need to use mod_perl or FastCGI. Plain vanilla CGI can't do it because the perl process is created completely new for every request.