in reply to dbh->disconnect or leave to scope
While I completely appreciate from the perspective of the perl it's not a big deal to handle it with scope, please remember to be considerate when you are connecting to a system that maintains a persistent connection. Be aware of how long the infrastructure will maintain that session. Using disconnect will hopefully tell the DB that you are done with that connection and session, freeing it for other systems to use. I have seen many times people hitting infrastructure and not cleaning up their connections causing problems on the infrastructure side by taking all connections and not cleaning up after themselves. I personally think it's very bad practice.