So there we have it. Not to shabby, if I dont say so myself. I'm still learning, and enjoying every day of it, so the way I figure it, yay. Alas, I am curious as to weither or not there is a glarningly obvious way to do this that I've overlooked.print FILE format_text(length => 10,string => \$string); ######################## ## format_text ######################## sub format_text { my %args = (@_); ${$args{string}} = substr(${$args{string}},0, $args{length}); return "${$args{string}}" . ' 'x($args{length} -length(${$args +{string}})); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (golf)String Concats or: playing with substr()
by Masem (Monsignor) on May 18, 2001 at 23:13 UTC | |
by one4k4 (Hermit) on May 18, 2001 at 23:31 UTC | |
by chipmunk (Parson) on May 18, 2001 at 23:37 UTC | |
by Albannach (Monsignor) on May 18, 2001 at 23:42 UTC | |
by one4k4 (Hermit) on May 21, 2001 at 17:24 UTC | |
|
Re: (golf)String Concats or: playing with substr()
by ChemBoy (Priest) on May 19, 2001 at 00:35 UTC | |
by one4k4 (Hermit) on May 19, 2001 at 02:56 UTC | |
|
Re: (golf)String Concats or: playing with substr()
by srawls (Friar) on May 19, 2001 at 00:45 UTC |