Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Padding with \s

by jlongino (Parson)
on Sep 13, 2002 at 14:05 UTC ( #197586=note: print w/replies, xml ) Need Help??


in reply to Padding with \s

My favorite method uses pack:
$str = pack('A40',$str);
Note that this will truncate the string if it is longer than 40 characters.

--Jim

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://197586]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2017-03-29 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (343 votes). Check out past polls.