in reply to Best way to check which field(s) was changed

This query: "UPDATE table_name SET column_name=$inputUpdate[0] WHERE column_name=$input[1]" can update more than one rows at once! Probably it is not what you want. There some unique index column must be used for update.

I suggest to have two hashes: %input, and %inputUpdate instead of arrays. Those hashes contain ColumnName => value pairs.

Than, assuming ID is identity column:

my %update = map {$_ => $inputUpdate{$_} } grep {$inputUpdate{$_} ne $input{$_} } keys %input; $dbh->do(<<"SQL", undef, values %update, $input{ID}); update TableName set @{[ join ', ', map {"$_ = '?'"} keys %update]} where ID = ? SQL $dbh->commit;