Re: Using "Sleep "

From: Eric Bohlman (ebohlman_at_omsdev.com)
Date: 09/09/04


Date: 9 Sep 2004 13:58:11 GMT


"George Kinley" <georgekinley@hotmail.com> wrote in
news:vCY%c.24967$k4.485279@news1.nokia.com:

> for(;;)
> {
> print "a";
> sleep (1);
> }
>
> The above script does not print any thing on console , till I modify
> it like
>
> for(;;)
> {
> print "a\n";
> sleep (1);
>
> }
> why?

Output buffering. perldoc -q flush will give you the detailed answer and
the appropriate workaround.



Relevant Pages

  • expect: sleep question
    ... When I have "sleep 1" to the expect script, is it possible for it to ... cause a loss of the console that it is telnet-ted to? ...
    (comp.lang.tcl)
  • Re: Sleep command quitting
    ... It cannot be that the `sleep` command is terminating. ... That script was popular when I started working at SCO Support in 1989. ... it doesn't really hold the settings you specify. ... anything else comes along and makes further changes, the holdopen script ...
    (comp.unix.sco.misc)
  • Re: WScript.dll not working
    ... But, when i call a script indirectly in my application's exe's context, then it doesn't repond further. ... the sleep method is coded into the ... could call the sleep api directly from script. ...
    (microsoft.public.scripting.vbscript)
  • Re: Rename File Using Strring Found in File?
    ... OK, thanks, but the script does not seem to rename the files. ... # sleep 1; ... to the string in this particular file that I want to match. ...
    (comp.lang.perl.misc)
  • my script crashes when I try to rename the file!
    ... OK, thanks, but the script does not seem to rename the files. ... You can set the working directory from within your Perl ... # sleep 1; ... to the string in this particular file that I want to match. ...
    (perl.beginners)