http://www.perlmonks.org?node_id=1022007


in reply to Write padded output without newline

If printf is being tricky then you could use x instead

print OUTFILE $_,' ' x (200 - length($_));