my $id = $dbh->last_insert_id(); die "Foo: " . $dbh->errstr() if !defined($id);