Well, your solution worked :) At least as far as fixing the term issue. However, a side effect is that the processes continue running on the servers after the SSH connection is killed (arrrrgh). So sorta back to square one.

I have had some luck with the following line, but it feels like a cheesy way (and not 100%) to fix the issue. Before the print and in various places:

system('stty sane');

So confirmed that it's definitely a term settings issue. Over 95% of the time there are no print issues. However, now trying to pipe the output into any other tool crashes the program (leaving tons of threads running and dormant processes). Other users will certainly pipe the output so that's a problem. Maybe I need to pass Perl code to the servers like you were saying (to kill the processes once SSH is killed). This way I don't need to use that buggy -tt SSH option.


In reply to Re^10: Threads Printing Issue - Output Mangled / Term Crashing by bigbot
in thread Threads Printing Issue - Output Mangled / Term Crashing by bigbot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.