I think the problem is read doesn't return. Because if it had retured the program would have terminated(becuase it must have exited the loop). But the program never ends. It does what File::Tail should be doing but just doesn't update it with the new file's contents.