Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Best way to round a number.

by CountZero (Bishop)
on Oct 25, 2012 at 07:58 UTC ( #1000775=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Modern::Perl;
    
    my %rule = (
    ...
        s/(\d*(\d))/$1+$rule{$2}/e;
        say "\t rounded=$_";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-09-15 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (147 votes), past polls