Well you can use sprintf, but I don't see why there's any need for a while loop.
--$str = sprintf '%-40s', $str;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Padding with \s
by davorg
in thread Padding with \s
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |