use DBI; # Load the DBI module ### Perform the connection using the Oracle driver my $dbh = DBI->connect( "dbi:mysql:MYDB:localhost:3306", "NYUSER", "MYPASS", { PrintError => 0, RaiseError => 0 } ) or die "Can't connect to the database: $DBI::errstr\n"; ### Prepare a SQL statement for execution my $sth = $dbh->prepare( "UPDATE user_settingsX set `language`=? WHERE `username` = ?" ) or die "Can't prepare SQL statement: $DBI::errstr\n"; ### Execute the statement in the database $sth->execute("fr", "admin") or die "Can't execute SQL statement: ",$sth->errstr,"\n"; ## I also tried: "Can't execute SQL statement: $DBI::errstr\n"; ### Disconnect from the database $dbh->disconnect or warn "Error disconnecting: $DBI::errstr\n"; exit;