in reply to Adding floats

Change:

return sprintf("%.2f", $outval/100);

to

return $outval;

Change:

print "\$total: $total\n";

to

printf("%s: %.2f\n", '$total', $total/100);

- tye        

Replies are listed 'Best First'.
Re^2: Adding floats (integers)
by perldiverx (Beadle) on Sep 19, 2014 at 11:49 UTC
    This worked great, thanks