Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Format, empty vars, and fixed-width records

by BrowserUk (Patriarch)
on Apr 22, 2008 at 00:14 UTC ( [id://682057]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [0] Perl> printf "%2.2s\n", $_ for 9, 99 .. 101;;
     9
    ...
    99
    10
    10
    
  2. or download this
    printf "%-8.8s\n", sprintf '%8f', $_ 
        for map{ 1.23456789 * $_} map{ "1e$_" } -10 .. 10;;
    ...
    12345678
    12345678
    12345678
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-03-29 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found