use strict; use diagnostics; ############################################################ # Using the \$STATEMENT varible makes it easier # for me to prepare it for 'quotes' that are needed # by SQL (MySql) and helps me resolve my variables safely. # ---------------------------------------------------------- my $STATEMENT = "UPDATE SUPPORTDESK.CONTACT_PERSON SET SALUTATION=$SALUTATION,FIRST_NAME=$FIRST_NAME,MIDDLE_INITIAL=$MIDDLE_INITIAL,LAST_NAME=$LAST_NAME,NOTES=$NOTES WHERE CONTACT_PERSON.CONTACT_PERSON_ID=$CONTACT_PERSON_ID"; ############################################################ # Prepare the statement for database execution. This inserts # quotes where needed # ---------------------------------------------------------- # $DBACCESS is the database connection handle '$dbh' my $COMMAND = $DBACCESS->prepare($STATEMENT); #Executed the statment. $COMMAND->execute; ############################################################ # Kill the statement handle so that you can safely # disconnect from the database. # ---------------------------------------------------------- $COMMAND->finish;