Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: printing to filehandles

by Roger (Parson)
on Sep 02, 2005 at 10:54 UTC ( [id://488610]=note: print w/replies, xml ) Need Help??


in reply to printing to filehandles

You have to flush your file handle after printing to write to the disk immediately, otherwise it gets conveniently buffered in memory.
use FileHandle; ... open OUT, ...; autoflush OUT 1; print OUT ...;

The alternative is to close the file after you have finished reading, and open it again next time before writing to it. Keep the time that the file is openned as short as possible.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-03-19 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found