develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [perl #55172] autoflush output after :encoding pushed

Thread Previous | Thread Next
June 2, 2008 15:12
Re: [perl #55172] autoflush output after :encoding pushed
Message ID:
Citeren Kevin Ryde <>:

> # New Ticket Created by  Kevin Ryde
> # Please include the string:  [perl #55172]
> # in the subject line of all future correspondence about this issue.
> # <URL: >
> On the debian i386 packaged perl 5.10.0 the program below run
> just as "perl" 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 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,


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About