I think the problem is once you've done the first $line=<TAIL> it's too late. Here's what I wrote that DOES work correctly and will not exit the loop, but as I said I'm not proud of it ;):
in reply to Re^3: Different perl behavior between V5.10 and V5.14
in thread Different perl behavior between V5.10 and V5.14
open TAIL, "tail -f $logname|" or die "couldn't open $logname";
printf "EOF: %d\n", eof(TAIL);
last if !($line=<TAIL>);
print "Fell through...\n";
I also wonder if doing that eof() test at the beginning go throw me into an infinite loop under some conditions, but as so far this seems to be ok for now.