Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Subroutine does not sleep

by kwaping (Priest)
on Oct 06, 2006 at 14:54 UTC ( [id://576692]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://576692]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found