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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to always round up in perl?
by toolic (Bishop) on Feb 25, 2011 at 02:03 UTC | |
|
Re: how to always round up in perl?
by umasuresh (Hermit) on Feb 25, 2011 at 01:59 UTC | |
|
Re: how to always round up in perl?
by philipbailey (Curate) on Feb 25, 2011 at 09:10 UTC | |
by chrestomanci (Priest) on Feb 25, 2011 at 09:19 UTC | |
by sbohning (Initiate) on Oct 11, 2021 at 17:01 UTC | |
by Ratazong (Monsignor) on Feb 25, 2011 at 09:18 UTC | |
by toolic (Bishop) on Feb 25, 2011 at 14:25 UTC |