in reply to Re: add a line based on maxline length
in thread add a line based on maxline length

Surely a Perl script of that brevity can be reduced to a one-liner:

perl -lpe '$p = length if $p < length; END {print "X" x $p}'

--Dave