in reply to Subroutine does not sleep

Also, don't forget to turn on autoflush ($| = 1; will do that). Otherwise, your perception of what the program is doing is going to be skewed by output buffering.

Update: I re-read the thread and realized my reply doesn't address the issue. However, I feel it's still good general advice for something like this.

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^2: Subroutine does not sleep
by Anonymous Monk on Oct 06, 2006 at 15:35 UTC
    But the advice isn't that useful. He's printing to the terminal, and the terminal is in line-buffer mode. Regardless of the value of $|, as soon as a newline is printed (which he does), the output gets flushed.