my $dbh = DBI->connect($db_info, 'username', 'password', { PrintError => 0 } ) or die("Couldn't connect to database\n"); sub get_handle { my $dbh; } print "info: " , getdb() , "\n";