Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: limiting decimal points

by Loops (Curate)
on Jul 17, 2013 at 04:59 UTC ( #1044717=note: print w/ replies, xml ) Need Help??


in reply to limiting decimal points

You can use printf

printf("%0.4f ", $_) for (.0069874, .0012365, .98752115, .0002332);


Comment on Re: limiting decimal points
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-12-26 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls