Citeren Kevin Ryde <perlbug-followup@perl.org>: > # New Ticket Created by Kevin Ryde > # Please include the string: [perl #55172] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=55172 > > > > On the debian i386 packaged perl 5.10.0 the foo.pl program below run > just as "perl foo.pl" doesn't print "hello" until after 10 seconds, > whereas I hoped setting $|=1 would force immediate output. > > Using IO::Handle->flush seems to have the same non-effect, ie. doesn't > flush the hello. > > > But it's possible I'm labouring under some misunderstanding of what > flush/autoflush should do. I thought it meant "make the output go to > the system", but some experimenting with how a pushed :encoding layer or > a :perlio buffer layer call their sub-layer "Write" and "Flush" funcs > made me wonder if it's not. (I saw Flush after every 4096 or 1024 byte > block, not only in response to a top-level autoflush or flush method > call.) At any rate if non-output in foo.pl below is what's expected > then a little further explanation in perliol or perlvar $| would be > good. You need to turn autoflush on beforing the print statement. Or add print "" after turning autoflush on. Kind regards, BramThread Previous | Thread Next