Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: A Set String Length

by ase (Monk)
on Jul 27, 2000 at 14:08 UTC ( [id://24651]=note: print w/replies, xml ) Need Help??


in reply to A Set String Length

I actually did  $string .= " " x ($width-length($string)); in a script today - D'oh! Didn't even think about /printf | substr | unpack/ As it turned out, 'funny' things happen when <code>($width-length($s)<0</code)> so either you need to test for that (as I ended up doing) or do it another way -pack seems to be the best tool for what I'm doing -thanks for the fresh view.
-ase

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-20 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found