The POSIX module is part of the standard distribution and has both ceil and floor() functions.
#! perl -sw use strict; use POSIX; my $n = 5.2; print $n, ' ', POSIX::ceil($n), ' ', POSIX::floor($n), $/; __DATA__ C:\test>203372 5.2 6 5 C:\test>
In reply to Re: round numbers
by BrowserUk
in thread round numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |