Help for this page

Select Code to Download


  1. or download this
    sub LockFile
    {
    ...
      }
      close ($fh) ;
    }
    
  2. or download this
    local ($lockFH, $lockPath, $lockMode) = LockFile ("test.txt", 2);
    # Wait 10 seconds before calling UnlockFile
    UnlockFile ($lockFH, $lockPath, $lockMode);