On Sun, Mar 07, 2004 at 05:57:57AM +0100, [EMAIL PROTECTED] wrote: > Hi all, > why don this littly thingy work? It should print, sleep and after sleep print again > but it does print both at same time. Not one before sleep and one after. I tried: > > while ($i < 10) > { > print'sleep...'; > sleep(10); > print" done\n"; > } > > Anyone can help me with that? > Thx! :)
Buffering. Add $| = 1; near the start of the program. perldoc perlvar -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>