PDA

View Full Version : Perl Rounding Problem


sambartle
01-03-2004, 16:52
Ok this should be another simple one for you...

If i do say $var=23/10; in perl and get $var=2.3 how do i get that rounded up to the next nearest whole integer.

Is there a roundup function or easy way to do this?

Thanks,
Sam (i dont know perl in case you hadnt noticed)

sambartle
06-03-2004, 14:30
solved.
the function needed is ceil() for anyone searching whio finds this thread.