in reply to Different way of rounding
> perldoc -q round Found in C:\Perl\lib\pod\perlfaq4.pod Does Perl have a round() function? What about ceil() and floor()? +Trig functions? Remember that int() merely truncates toward 0. For roundin +g to a certain number of digits, sprintf() or printf() is usually + the easiest route. printf("%.3f", 3.1415926535); # prints 3.142
Update: Ah, my mistake. You always want it to round up. How odd. :) Yeah, see BrowserUK's solution.
bbfu
Black flowers blossum
Fearless on my breath
|
|---|