in reply to Re: if (open(FH, $path)) { ?
in thread if (open(FH, $path)) { ?

I don't see the point in testing whether a file is readable before attempting to open it for reading. It both adds unnecessary verbosity to the code and introduces the race condition as others have pointed out.