in reply to Re: How do I round a number?
in thread How do I round a number?
$rounded = int ( $orig + 0.5 ) assumes $rounded is positive.
More generally: use POSIX; $rounded = floor ( $orig + 0.5 )
or $rounded = sprintf( "%.f" , $orig ) to properly handle the half-way case
See also `perldoc -q round`