Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: A Set String Legngth

by young perlhopper (Scribe)
on Jul 27, 2000 at 06:31 UTC ( #24618=note: print w/replies, xml ) Need Help??


in reply to A Set String Length

you can use printf to pad your fields like this:

printf("%-10s;", $string);
the minus sign means the padding goes to the right of the string, so you will get the spaces between your string and the semicolon

node 20519 has all the info you need about printf.

Good luck,
-Mark

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-08-16 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?