# For example: my $sql = "insert into lookup (SYS_ACC,REPORT_NAME,JOB_NAME) values (?,?,?)"; my $sth = $dbh->prepare($sql) or die $dbh->errstr; $sth->execute($sys_acc, $report, $job) or die $sth->errstr #update: forgot error check # Easier to read and how it was intended. #### my $countofrowsaffected = $dbh->do($sql, undef, $sys_acc, $report, $job) or die $dbh->errstr;