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

Re: Math 101 anyone?

by gawatkins (Monsignor)
on Oct 12, 2004 at 20:10 UTC ( #398675=note: print w/replies, xml ) Need Help??


in reply to Math 101 anyone?

Hello smcone,

You can use the sprintf function to round your numbers to 2 decimal places, something like this:.

perl -e "print sprintf ('%.2f', (100.10-100));"

Thanks,
Greg W.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://398675]
help
Chatterbox?
[shmem]: hmm after some looping I get it via http
[choroba]: After submitting the form, I'm getting "Sorry, we're really busy right now, please wait for a bit. This page will automagically refresh soon"
[hippo]: Still nothing via https
marto pictures someone trying to fix a problem, while the page gets battered by F5s :P
[hippo]: Who maintains deps? Is it barbie?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (15)
As of 2018-02-20 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (271 votes). Check out past polls.

    Notices?