If this is a long running perl program then you are probably getting a "MySQL server has gone away" error issue. The DBH will time out after 8 hours (by default). You either do a transparent reconnection or potentially up the timout in /etc/my.cnf. I have seen the PHP guys advocate upping the time out as a fix (bad solution generally) but be aware you will run out of connections unless you close them on exit...
[root@devel3 james]# cat /etc/my.cnf