in reply to Re: Read entire file then clear while flocking
in thread Read entire file then clear while flocking

POSITION and WHENCE reversed - it ought to be: seek $fh, 0, SEEK_SET;