my $str = sprintf( "%${len}s", $str );
perldoc -f sprintf if you need to do anything fancier like left justify.
Update: D'oh, the original question was about left justified. Not like there's not 15 bazillion other answers to pick from . . . :)
In reply to Re: Generating standard length strings
by Fletch
in thread Generating standard length strings
by kage-yojimbo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |