in reply to (golf)String Concats or: playing with substr()

First of all, this solution was just for fun, I don't recomend using it; that said:

I wanted a solution that used one regex, so here it is:

$text =~s/(.{1,$length}).*/ length($1)<$length?$"x($length-length($1)).$1:$1/e;


The 15 year old, freshman programmer,
Stephen Rawls