Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Printing to a file problem

by Arien (Pilgrim)
on Aug 22, 2002 at 21:56 UTC ( [id://192187]=note: print w/replies, xml ) Need Help??


in reply to Re: Printing to a file problem
in thread Printing to a file problem

It may be that you are closing your file handle before the data is actually written out.

Closing a filehandle automatically flushes anything left in the buffer.

— Arien

Replies are listed 'Best First'.
Re: Re: Re: Printing to a file problem
by gnu@perl (Pilgrim) on Aug 23, 2002 at 14:07 UTC
    I seem to have mistated myself. What I meant to say is that the data has not yet been written to the file when he attempts to read from it and turning on autoflush would take care of that problem. You are correct about flushing on close. In the sample code here there is no close, so I must assume that he is trying to read from the file just after the write and before any close on the associated file handle.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://192187]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2025-02-09 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (95 votes). Check out past polls.