|
|
| XP is just a number | |
| PerlMonks |
Re: how to always round up in perl?by philipbailey (Chaplain) |
| on Feb 25, 2011 at 09:10 UTC ( #890147=note: print w/ replies, xml ) | Need Help?? |
|
Or if you do not want to import a mass of functions into your namespace from the POSIX module, just do this:
(Update) Above is incorrect, as pointed out by others. This works: my $ceiling = ($n == int $n) ? $n : int($n + 1);
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||