Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!emcard!wa4mei!rsiatl!pda From: pda@rsiatl.UUCP (Paul D. Anderson) Newsgroups: comp.lang.perl Subject: Problems with format... Message-ID: <1649@rsiatl.UUCP> Date: 6 Apr 90 16:06:33 GMT Reply-To: pda@rsiatl.UUCP (Paul D. Anderson) Organization: Crossroads Computing, Inc Lines: 41 I have been working with Perl's format statement and have been experiencing a bit of trouble with interleaving of IO. It appears that some data in the body of the output is put in a magical buffer that doesn't get flushed until the output is closed. The only thing that I am doing that is a bit unusual is embedding escape sequences in the format strings to cause a laser printer to change fonts... The end effect is that about the first 1 to 5 lines of text output by 'format OUT =' setup endup in the output file after all other text has been sent. Can anyone see anything that might cause such a problem? 'tabexp' is a tab expansion program. All program output is directed to a file or the laser printer under normal operation. The 'x.' in the format statements is really just a '.' in normal operations. The following is essentially the structure of the program: $COMPRESS="^[abcdefghijkl"; $RESET="^[E"; format top = @< $RESET Some text to be presented @<<<<<<<<<<<< $COMPRESS x. format OUT = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $data x. foreach $a (<*>) { open(IN,$a); open(OUT,'|tabexp'); while () { $data = $_; write(OUT); }; close(IN); close (OUT); };