# this is the format of the lines # "Description", "Date", "Amount", "Category", "Memo", "Check Number", "Reconciled" my $file = "checkdata.csv"; open( F, "$file" ); my @lines = ; my $sum = 0; foreach my $line ( @lines ) { chomp( $line ); my @data = split( ",", $line ); my $v = $data[2]; my$vplus = $v + 1; # I tried doing this to take care of trailing zeros, leading space and minus. my $data[2] =~ /\s*(-?\d*\.\d*)0000/; my $v2 = $1; print " $v plus 1 is $vplus\n"; print " $v2 is regexed\n"; $sum = $sum + $data[2]; } print $sum;