Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 chanting in the Monastery: (4)
As of 2016-02-08 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (267 votes), past polls