Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Using (s)printf()

by RichardK (Parson)
on Aug 31, 2016 at 18:03 UTC ( [id://1170912]=note: print w/replies, xml ) Need Help??


in reply to Re: Using (s)printf()
in thread Using (s)printf()

Try this

perl -E 'printf("%12.4f\n",12.34)'

gives

>     12.3400

see the docs for sprintf for much more detail :) but in brief it's "%<length>.<dp>f"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-20 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found