in reply to Generating standard length strings
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 . . . :)
|
|---|