in reply to Re^2: Can't get flock() to work. Please help...
in thread Can't get flock() to work. Please help...

Then change you file open boilerplate to:

open my $fileIn, '<', $filename or die "Can't open $filename: $!";

which uses the three argument form of open (you werre already actually, but just making it explicit), uses lexical file handles (with strict that would have caught your typo too) and reports open errors.

True laziness is hard work