Thanks Poj,
To have the sum as integer, the (number*100) has to be converted to an integer using round.use Math::Round qw/round/; my @nr=('32431.19', '20', '-10', '-31800'); my $x=0; foreach (@nr) { $x+=round($_*100); print "$_ => ".$x/100 ."\n"; }
In reply to Re^2: Problems with number resolution
by Anonymous Monk
in thread Problems with number resolution
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |