# untested if ($unrounded =~ /\.(\d)/ and $1 > 4) {$rounded = int ($unrounded + 1)} else {$rounded = int $unrounded}