Seek log file
#!/usr/bin/perl use strict; use warnings; open LOGFILE, "log.txt"; while (1) { print "$.: $_" while <LOGFILE>; sleep(1); seek LOGFILE, 0, 1; }