in reply to Database connection

Use singleton pattern to access your dbh. Take a look at Class::Singleton on CPAN.