open(TAIL, "tail --follow=name logfile.log|") or die "TAIL : $!"; while () { print "matt: $_\n"; sleep(1); # # Should print "matt" once every second regardless if tail is providing data or not }