Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated from rt.perl.org#1989 (status was 'resolved')
Searchable as RT1989$
The text was updated successfully, but these errors were encountered:
I have a query on Perl I/O I am using in my scipt and I would highly appreciate if you could help me out with this.
Program
$file="output"; open(FL,">>$file");
while (<>) { print FL $_; }
close(FL);
The above program "read.pl " takes input from STDIN and writes to a file "output".
QUERY : But the write takes place only after the loop is exited and the file is closed.
Is there a way where we can flush the buffer and have it written in the while loop itself. I looked for a flush function but could not find one.
Any suggestions ?
Thanks in advance,
Manoj
Sorry, something went wrong.
On Fri, Jan 14, 2000 at 06:31:15PM -0500, Manoj Raghavan wrote:
This is explained in Perl's FAQ. perlfaq5:
How do I flush/unbuffer an output filehandle? Why must I do this?
Ronald
No branches or pull requests
Migrated from rt.perl.org#1989 (status was 'resolved')
Searchable as RT1989$
The text was updated successfully, but these errors were encountered: