I've never worked with Sybase, but I know that DBI has a connect_cached method. It checks a cached connection to find out if its dead before it opens a new connection. I use this often to ensure my db connections (MySQL, Oracle) are valid before running an operation.