I need help doing some basic arithmatic on some database values. Initially, I query my table for all product codes and quantity ( using DBI ). Then I display these non-editable values along with two editable fields for entering a value that will be added/subtracted from original quantity in a form (using CGI) so it looks something like this: Product Name | Quantity | Add | Subtract WidgetA | 10 | | . . . What I need to do happen when the form is submitted is take all the input in the add and/or subtract fields and do the appropriate math on the original quantity value, then store the newly calculated quantity back into the table. Can anyone please give me a good example to work with?