use IO::Select; open (F, 'tail -f somefile.log |') or die; $select = IO::Select->new(*F) or die "Unable to create select object"; while() { $lastrec = "matt: ".$_; print $lastrec; while (! $select->can_read(1)) { print $lastrec; } }