Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Rounding Variables

by kilinrax (Deacon)
on Oct 09, 2000 at 20:09 UTC ( [id://35932]=note: print w/replies, xml ) Need Help??


in reply to Rounding Variables

Try this:
$roundeddistance = int($distance*100)/100;
(assuming you want it rounded down, and not padded with zeroes. If not, see $code or die's suggestion below)

Replies are listed 'Best First'.
RE: Re: Rounding Variables
by Anonymous Monk on Oct 09, 2000 at 20:10 UTC
    Perfect.. thanks for the lightning fast help
    -Dipul

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-26 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found