Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: A Set String Length

by ase (Monk)
on Jul 27, 2000 at 14:08 UTC ( #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
Node Status?
node history
Node Type: note [id://24651]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2018-10-18 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (99 votes). Check out past polls.

    Notices?