my $sth=$dbh->prepare($MYSQL) or die "Could not prepare $MYSQL: $DBI::errstr\n";
...etc. for all connects, executes, etc.
####
$dbh->trace(2);
####
my $string = "find me";
my $newstring = $dbh->quote($string) or die "Could not quote $string: $DBI::errstr\n";
print "($string) has become ($newstring)\n";
####
my $bazfind = shift || "12";
print "Looking for $bazfind.\n";
my $dbh=DBI->connect($SID, $user, $pass, {AutoCommit=>1})
or die "Could not connect to $SID: $DBI::errstr\n";
my $FOOBAR_SQL = "SELECT FOO FROM BARVILLE WHERE BAZ=?";
my $sth=$dbh->prepare($FOOBAR_SQL)
or die "Could not prepare $FOOBAR_SQL: $DBI::errstr\n";
$sth->execute($bazfind)
or die qq!Could not execute $FOOBAR_SQL with "$bazfind": $DBI::errstr\n!;
...etc. etc.