in reply to Idiomatic Perl
You can shorten it to $total += $increment if you are sure increment is a number.
$total += $increment || 0 will avoid warning if $increment is undefined, but your original version reads better (at least to my eyes).