Why doesn't this work? 
Author Message
 Why doesn't this work?


>Why doesn't this work?

>  $output .= $value;
>  print "\033]2;$output\007";
>  sleep 1;
>If I add a \n to the print statment then it works fine!!  What is


It does work, just not character-by-character, because stdio is
buffered and the word wont appear 'til the buffer is flushed,
(in this case at the end of the script). Try setting $|=1 for the
desired effect.



Wed, 16 Jul 1997 23:55:00 GMT  
 Why doesn't this work?
: Why doesn't this work?
: #!/usr/local/bin/perl

:   $output .= $value;
:   print "\033]2;$output\007";
:   sleep 1;
: }
: If I add a \n to the print statment then it works fine!!  What is
: happening?

Your pipes need to be piping hot. By default, all output and input is

Try setting $|=1 at the beginning of the script, or preferably just before
that section. You generally want to set $|=1 only for sections that
require direct unbuffered output to the screen such as this; make sure it
is turned off after with $|=0 or your file i/o will suffer.  
Hope this helps.


Thu, 17 Jul 1997 10:58:35 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Why doesn't this work?

2. Why doesn't this work?

3. Why doesn't this work?

4. Why doesn't this work? (PLEASE Help)

5. Perl5 question - why doesn't this work?

6. Why doesn't the @_ work?

7. Why doesn't this work?

8. Why doesn't this work, about SSI?

9. Why doesn't this work anymore

10. Why doesn't \n work

11. ftpget package - why doesn't it work ?

12. Help -- why doesn't it work?


Powered by phpBB® Forum Software