In case if the $num was 99711111, program would round it to 100 for the first two digits which is ok, but then it will eat one digit, in this case 7, so we would be a lower number, approx. 10 times lower, So $l should be 2, to indicate next character which was not considered in rounding.
In case if the $num was 99711111, program would round it to 100 for the first two digits which is ok, but then it will eat one digit, in this case 7, so we would be a lower number, approx. 10 times lower, So $l should be 2, to indicate next character which was not considered in rounding.