sub new_dbh { .... .... Establish the database handle Check other stuff, etc } #### $dbh = new_dbh({host=>'blablah'},{AutoCommit=>1}); $customer_handle="fred"; my $sth = $dbh->prepare(qq{select id from customer where handle=?}); $sth->execute($customer_handle);