sprintf "%${length}.${length}s", $string;
as it is the number following the dot that gives the maximum field width when using the s. You could also left-justify by throwing a - in after the % if you like.
--
I'd like to be able to assign to an luser
In reply to Re4: (golf)String Concats or: playing with substr()
by Albannach
in thread (golf)String Concats or: playing with substr()
by one4k4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |