in reply to sleep on windows w activestate perl

The sleep is occurring, but the output buffer isn't getting flushed until the script terminates. The reason is that the output buffer only gets flushed under one of three conditions: (1) The program terminates OR (2) You output a '\n' character OR (3) the buffer fills.

You can modify this behavior by setting $| to 1 (turning on autoflush), or you can just end your printed lines with a newline character to force a buffer flush.


Dave

  • Comment on Re: sleep on windows w activestate perl