in reply to Re: Count number of lines?in thread Count number of lines?
BTW, to avoid having to remember that 2 is "exclusive lock", you can use symbolic names from the Fcntl module:
use Fcntl; ... flock(I, LOCK_EX); [download]