[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Perl File Utilities
Section 62 out of 79 total sections , Section 4 out of 5 sections in this chapter


LockFile()


Description

Locks a specified filehandle, causing the process to block until the file is available. Note that to write-lock a file, the file must be opened for writing; to read-lock a file, the file must be opened for reading.


Synopsis


Arguments

Argument  Meaning  
$fh  

Reference to the file handle to lock.  

$lockType  

The type of lock with which to lock the file. Specify READ or WRITE. The default is WRITE.  


Returns

Value  Meaning  
0 but true  

Success. 

undefined  

Failure. 


[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Perl File Utilities
Section 62 out of 79 total sections , Section 4 out of 5 sections in this chapter


Copyright © 1999, Unwired Planet, Inc. All rights reserved.