in reply to Perl suddenly pauses for key input

What is your evidence that pressing a key on the keyboard causes your program to resume?

If your program is waiting until there is input available form the keyboard and resuming when it is available without consuming it, then it is likely that you are mistaken about it not trying to "listen" to an input, though it would have to be something other than simply reading from <STDIN>, which would consume the input.

One option would be to run it under strace or truss, if you are so lucky as to be running on a *nix system. That might show you what it is waiting on.

update: It seems there is a trace program for Windows also.