in reply to Re: how to always round up in perl?
in thread how to always round up in perl?
if you do not want to import a mass of functions into your namespace from the POSIX module... just do this:
According to How to Import, this selectively imports only the ceil function.use warnings; use strict; use POSIX qw(ceil); for (3.3, 3.6, 3003.3) { print $_, "\t", ceil($_), "\n"; } __END__ 3.3 4 3.6 4 3003.3 3004
Alternately, you could import nothing and call the function using POSIX::ceil.
In Section
Seekers of Perl Wisdom