in reply to Disconnecting from a Database

I always put my disconnect statement at the end of the function/program whenever I'm done with the database completely. I'm not a DBI whiz so that might not be The Right Thing but that's always what I've done.
my $dbh = DBI->connect("DBI:mysql:fenonn:localhost","fenonn","password +"); my $sth = $dbh->prepare("SELECT data1 FROM table1"); $sth->execute() || die "Couldn't execute statement: DBI::errstr; stopp +ed"; my ( $data ) = $sth->fetchrow_array(); $dbh->disconnect; print $data;