in reply to Padding with \s
My favorite method uses pack:
Note that this will truncate the string if it is longer than 40 characters.$str = pack('A40',$str);
--Jim
|
---|
In Section
Seekers of Perl Wisdom