in reply to Re^2: File locking
in thread File locking
use Fcntl qw(:flock); # import LOCK_* constants open F,">>",$somefile or die $!; flock(F,LOCK_EX); # lock exclusively - waits for lock # write stuff here close(F); # close() will release the lock.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |