#################### #Doing stuff in my Perl script #opening DB connection and other functions #Now I need to execute some DB query #################### $sth = $dbh->prepare($sql_statment_1) or die "Couldn't prepare the query: $sth->errstr"; $rv = $sth->execute or die "Couldn't execute query: $dbh->errstr"; $rc = $sth->finish; ################ #Go back to doing other Perl routines & stuff here #Now I need to do more DB stuff ############### $sth = $dbh->prepare($sql_statment_2) or die "Couldn't prepare the query: $sth->errstr"; $rv = $sth->execute or die "Couldn't execute query: $dbh->errstr"; $rc = $sth->finish;