Rounding Up/Down Numbers

A

aleatory

Good afternoon perl gurus,

Once again I have a question on perl.

How could I round up/down numbers? For
instance:

| 2.456 <--original number
| 3 <--rounding up
| 2 <--rounding down
| 2.46 <--rounding up but keeping
| the last two digits after
| the decimal point

After reading "Beginning Perl" by Simon
Cozens, I just don't find any information
regarding these.

As before any information is appreciated.

Many thanks in advance,

alea
 
B

Beable van Polasm

Good afternoon perl gurus,

Once again I have a question on perl.

How could I round up/down numbers? For

Try reading the FAQ:

perldoc -q round


--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,244
Members
46,839
Latest member
MartinaBur

Latest Threads

Top