Dear Monks,

When running a program, it suddenly pauses. The CPU shows nearly 0% usage so I'm sure it didn't got stuck in an endless loop. Then, when I hit any key, the program resumes back to normal. The entered key will be shown in the next prompt like this:
C:\Project>perl test.pl 1 2 3 <--- Program paused here. Then, I entered 'q' and it resumes back + to normal. 4 5 C:\Project>q <--- After the program ended, the 'q' which I've entere +d previously to resume the program appears here.

This is just an example to describe my situation. The actual program is much much much longer, and takes minutes to hours to finish.

I'm very sure there is nothing in the code that is trying to listen to an input, like <STDIN> and Term::ReadKey. Furthermore, this happens intermittently, and it can happen anywhere in the program.

Have you experienced anything like this before when running a long program? Do you have any clues why something like this could happen? I've been debugging this for weeks. Your knowledge and wisdom is much appreciated.

Update: It's solved, thanks to BrowserUk. The culprit is the QuickEdit mode in one of cmd.exe's properties.

In reply to Perl suddenly pauses for key input by KHLeow

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.