Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Using (s)printf()

by RichardK (Parson)
on Aug 31, 2016 at 18:03 UTC ( #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
Node Status?
node history
Node Type: note [id://1170912]
help
Chatterbox?
[Corion]: marto: Ow! That doesn't sound good :-/ The work won't help your back...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-09-21 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (248 votes). Check out past polls.

    Notices?