in reply to Re: Trailing spaces to lines less than x characters
in thread Trailing spaces to lines less than x characters

That should be...

perl -lne 'printf "%-76s", $_' infile > outfile

...otherwise the spaces will get appended after the newline on each existing line, and then another newline will be appended after that.

Also in-place editing could look like this:

perl -lni.bak -e 'printf "%-76s", $_' infile

Dave