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.