Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Rounding of a number...

by steves (Curate)
on Dec 27, 2004 at 01:42 UTC ( [id://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/;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-23 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found