Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Rounding of a number...

by steves (Curate)
on Dec 27, 2004 at 01:42 UTC ( #417500=note: print w/ replies, xml ) Need Help??


in reply to Rounding of a number...

One way is to just drop the trailing digits:

my $x = $yearlyamount / 52; $x =~ s/(\.\d\d)\d*$/$1/;


Comment on Re: Rounding of a number...
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-09-20 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (158 votes), past polls