#!/usr/bin/perl use strict; use warnings; my $logfile = "/var/log/httpd/agent1_access.log"; open(FH,'<',$logfile) || handle_error(); # typical open call for (;;) { while () { print "$_"; } # eof reached on FH, but wait a second and maybe there will be more output sleep 1; seek FH, 0, 1; # this clears the eof flag on FH }