Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How do I lock a file?

by danstuken (Novice)
on Aug 01, 2007 at 13:23 UTC ( [id://630046]=note: print w/replies, xml ) Need Help??


in reply to How do I lock a file?

Note:

if you

open(FILE, ">testing")
you will truncate the file before you have it locked, this may not be what you want in a production system! Use
open(FILE, ">>testing")
before you get the lock and then truncate() if you want to, er, truncate the file once its locked. Or lock a separate semaphore file who's contents are unimportant.

Log In?
Username:
Password:

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

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

    No recent polls found