In the subroutines should I connect and disconnect the database every time #### can connection gone ? #### #!/usr/bin/perl use DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=dbfile","",""); sub foo { my $sth = $dbh->prepare( $some_query ); $sth->execute; } sub bar { my $result = $dbh->do( $other_query ); }