Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 having an uproarious good time at the Monastery: (4)
As of 2015-01-26 02:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (186 votes), past polls