[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Console buffer problem?



At 19.19 12/13/97, Brian L. Matthews wrote:
>Consider the following script:
>
>#!perl
>print "Going to sleep...\n";
>sleep 10;
>print "The sleeper has awoken!\n";
>
>If I run this in a MacPerl that's been running, it works as expected--I get
>the first line of output, it sits there 10 seconds, then I get the second
>line of output. However, if I run it in a freshly launched MacPerl, the
>console window doesn't open and display output until the script has
>finished.
>
>This is with the 68k regular application version of 5.1.5r4, on an 840AV
>running system 7.5.5.

Try setting autoflush.  Just append "$|++" to the beginning of the script.
I am not sure why it only does not work when MacPerl has just been opened,
but this should fix it.

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch