No such thing as a small change | |
PerlMonks |
Padding with \sby Anonymous Monk |
on Sep 13, 2002 at 13:21 UTC ( [id://197562]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Does anyone now a simple and easy way to pad the end of a line with spaces (\s) so its a fixed size.
Example:
I need to have each string a fixed size of 40 chars Should I use sprintf, and a while loop, or is there an easier way?? Thanks!
Back to
Seekers of Perl Wisdom
|
|