open (FILE,$dir) || &error("Can't open $dir: $!"); $sth=$dbh->prepare("insert into convert.sql_edits values (?, ?)"); while () { chomp; ($id, $value)=split/\|/; $sth->execute($id, $value); push @total, $sth->rows; } $sth->finish; close FILE; #### $sth=$dbh->do($sql) || &error("Unable to perform update statement:

$sql

$DBI::errstr\n"); $updated=$sth->rows; $dbh->commit() || &error("Unable to commit changes made by the update statement:

$sql

$DBI::errstr\n");; $sth->finish;