in reply to Format not adding to line when ending in spaces

I think you've stumbled on an undocumented feature of formats, that trailing spaces are removed. (No, I don't mean a bug).

Since you really do need the space, I suggest using either (s)printf, or to postprocess your output (which can be done from the same program using a pipe open - see 'man perlopentut') and to add the trailing spaces yourself.

It'll depend on the complexity of your format which is the easiest way to go.

Abigail

  • Comment on Re: Format not adding to line when ending in spaces