Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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


Comment on Re: Padding with \s
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-11-23 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (129 votes), past polls