Coplan has asked for the wisdom of the Perl Monks concerning the following question:
Basically...is there a way to set the sensativity of sprintf? Is there a way that I can plainly say round up if anything exists after the decimal?
Here's what I have so far:
--Coplanmy $total = $sth->rows; my $pageCount = sprintf( "%.0f", ($total / 20) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I round up if any decimal place exists?
by japhy (Canon) on Nov 26, 2001 at 06:37 UTC | |
|
Re: How can I round up if any decimal place exists?
by jlongino (Parson) on Nov 26, 2001 at 06:42 UTC | |
by Coplan (Pilgrim) on Nov 26, 2001 at 08:18 UTC | |
|
Re: How can I round up if any decimal place exists?
by cLive ;-) (Prior) on Nov 26, 2001 at 06:55 UTC | |
|
Re: How can I round up if any decimal place exists?
by Dr. Mu (Hermit) on Nov 26, 2001 at 09:56 UTC |