Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Waiting for a file to be written

by jethro (Monsignor)
on Oct 14, 2008 at 13:28 UTC ( [id://716981]=note: print w/replies, xml ) Need Help??


in reply to Waiting for a file to be written

Sorry to tell you, but you are suffering from buffering ;-). Tie::File has its own buffering scheme (which I found out simply through reading the man page of Tie::File). Look for "Deferred Writing". The solution is to use the flush method of Tie::File at appropriate moments or turn of the buffer completely with tie @array, 'Tie::File', $file, autodefer => 0;.

UPDATE: moritz has the right answer. You might think about using a different copy of the file for each of the subprocesses, if your file isn't too big

Replies are listed 'Best First'.
Re^2: Waiting for a file to be written
by why_bird (Pilgrim) on Oct 14, 2008 at 13:57 UTC
    Thank you, this was the information I was hoping for, until Moritz pointed out that it was not in fact the information I needed. Damn buffering!!
    ........
    Those are my principles. If you don't like them I have others.
    -- Groucho Marx
    .......

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2024-03-28 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found