in reply to How to get rounded numbers to =100% ??

Firstly, welcome to the Monastery alarix - And now on to your question ...

There are *so* many ways to do this that you are probably going to be drowned in a sea of answers to this question - So rather than try and forward them all, this is how I would do it ...

$thePercents[$k][$j] = int( $thePercents[$k][$j] + 0.5 );

This approach uses the int function that returns the integer portion of a number. By incorporating the addition of the 0.5, this function can be used as a rudimentary rounding function for positive numbers - If there is a likelihood that you would be rounding negative numbers in this way, something like int( $number + 0.5 * ( $number < 0 ? -1 : 1 ) ) would be more appropriate.

 

perl -le 'print+unpack("N",pack("B32","00000000000000000000001001011100"))'