Just another Perl shrine | |
PerlMonks |
how to always round up in perl?by cburger (Acolyte) |
on Feb 25, 2011 at 01:54 UTC ( [id://890101]=perlquestion: print w/replies, xml ) | Need Help?? |
cburger has asked for the wisdom of the Perl Monks concerning the following question: I'm doing a division of a number by 3 and I always want to round to the next greater number. If the result is e.g. 3.3 or 3.6 I want to report 4. Same with 3003.3 etc. How can I do this in perl? Thanks! C thanks to everyone! it works now :) the oneliners are quite neat.
Back to
Seekers of Perl Wisdom
|
|