Re: [PBML] to round off a decimal value
- On Wed, 2006-29-03 at 07:25 +0000, joshypy wrote:
> Dear friends,#!/usr/bin/perl
> Could anyone tell me the function to convert a number with decimal
> value to a number without decimal value.
> that is to convert a value 2.1333 to 2, 2.6666 to 3, etc
> thanking you
print ceil( 2.1333 ), "\n";
print ceil( 2.6666 ), "\n";
# See `perldoc POSIX` for details
Just my 0.00000002 million dollars worth,
"For the things we have to learn before we can do them,
we learn by doing them."
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/