Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Perl rounder...

by maverick (Curate)
on Apr 08, 2002 at 22:21 UTC ( #157587=note: print w/ replies, xml ) Need Help??


in reply to Perl rounder...

Sorry dude, it's already been done.

printf("%.$ARGV[1]f\n",$ARGV[0]);
printf takes a sting that describes what you want to print. In your case a floating point number (f) with a precision that you specify as the second arg ($ARGV[1]) using the value in $ARGV[0]

/\/\averick
OmG! They killed tilly! You *bleep*!!


Comment on Re: Perl rounder...
Download Code
Re: Re: Perl rounder...
by abaxaba (Hermit) on Apr 09, 2002 at 01:09 UTC
    Explains the negative comments votes.... REAP it then.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-07-02 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (29 votes), past polls