in reply to perl CGI: updating hidden field values for self-referring url

CGI preserves the values in the query string when regenerating a form. You can turn this behaviour off for the whole form using the '-nosticky' pragma or for individual form elements using the '-override' attribute. Try changing to:
print $q -> hidden( -name => 'sumTotal', -value => "$currentTotal", -override => 1, );