We don't bite newbies here... much | |
PerlMonks |
Re: rounding to nearestby dws (Chancellor) |
on Mar 22, 2003 at 10:15 UTC ( [id://245118]=note: print w/replies, xml ) | Need Help?? |
how can i round a variable (lets say $price = 418.00 ;) to the nearest 10 ie '420.00'
Be aware that in certain situations it's considered bad form to pretend to maintain precision at the hundredth level when you've just rounded the nearest 10. You might want to clarify whether '418.00' rounds to '420.00' or '420'.
In Section
Seekers of Perl Wisdom
|
|