http://www.perlmonks.org?node_id=896162


in reply to math problems

Out of curiosity, did you ever try printing $VAL1, $VAL2, $VAL3 before, or $TOT1, $TOT2, $TOT3 after, the sprintfs?

Then you would have had specific cases where the conversion worked, and where it didn't.