good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Generating standard length stringsby Roy Johnson (Monsignor) |
on Apr 14, 2005 at 18:59 UTC ( [id://447911]=note: print w/replies, xml ) | Need Help?? |
sprintf "%-${length}s", $string"
Update: note that length here is the name of a variable, not the function call being interpreted as a reference.
Caution: Contents may have been coded under pressure.
In Section
Seekers of Perl Wisdom
|
|