Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Re: sleep in while loop

by Shendal (Hermit)
on Aug 05, 2002 at 16:06 UTC ( #187721=note: print w/replies, xml ) Need Help??


in reply to Re: Re: sleep in while loop
in thread sleep in while loop

You may be getting bitten by buffering. Try this:
$|++; # force auto-flush (see perldoc perlvar) while (1) { if ($cond == 1) { print "1\n"; } else { print "2\n"; } sleep 10; }

Cheers,
Shendal

Replies are listed 'Best First'.
Re: Re: Re: Re: sleep in while loop
by Anonymous Monk on Aug 05, 2002 at 16:10 UTC
    Thanks - buffering was biting my proverbial ***- by the way the code in the loop was not the actual code - sorry to confuse the issue.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://187721]
help
Chatterbox?
[erix]: ITYM Schwartzian Transform :P
[erix]: hey planetscape :)
[planetscape]: howdy stonecolddevin, erix
[Sinistral]: eric Aye. I thought I typed that wrong. All hail Randall! I listen to him on FLOSS Weekly
[Discipulus]: i think his vacuus, trombon like, absence of meaning, joined with a ostentatious style, after many years irritates the most
[erix]: easy to get wrong -- I guess that was sund's point, too :P
[Discipulus]: planetscape welcome back! (or is well comeback?)
[Discipulus]: fore every 2 good old monks that come back, we will accept 1 clinical
[planetscape]: Might be "well, come back!" Discipulus ;-)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-06-22 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (530 votes). Check out past polls.