4.9. An easier way to execute non-SELECT queries

If you wish to execute a query such as INSERT, UPDATE, or DELETE, you may find it easier to use the do() method:

$dbh->do("delete from sales") || warn("Can't delete from sales table");

This method returns the number of rows affected, or undef if there is an error.