in reply to Re: sprintf format and print inconsistencies whilst creating fixed width column
in thread sprintf format and print inconsistencies whilst creating fixed width column

I am using a regular font, the sprintf spacing represents exactly what is output to email, i.e. its all over the place, oddly, the print statement shows that the spacing is correct.
  • Comment on Re^2: sprintf format and print inconsistencies whilst creating fixed width column

Replies are listed 'Best First'.
Re^3: sprintf format and print inconsistencies whilst creating fixed width column
by newbieperlperson (Acolyte) on Dec 20, 2013 at 02:28 UTC

    So, if I take the email output, throw it into a notepad document, the doc perfectly aligns as expected.

    It turned out that the font was causing this after all, a few users suggested it and I had looked at the wrong part of outlook for the font I was using for emails received. I needed to use a non proportional font, this link helped. http://stackoverflow.com/questions/12588021/perl-formatted-output-to-email-body

      newbieperlperson:

      In that case, you may want to send the EMail with two bodies, plain text and formatted. If you use HTML, RTF or similar formatting, it's relatively straightforward to get your data to line up even with proportional fonts.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.