On 2011-11-08 20:02, Noah wrote:

I am trying to round to 10 or 100 for particular values

so the following numbers
530
570

would become
500
600

perldoc -q round


perl -wle '
  print sprintf q{%.0f00}, $_ / 100
    for 530, 570, -530, -570;
'

--
Ruud


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to