I would only change one thing:
while (defined ($_ = $tail->read)) { if (/$regex/) { print; alarm 2; } }
That will prevent separator lines after reading a line that was filtered.
In reply to Re^2: tf - tail a file and output separator line when inactive
by imp
in thread tf - tail a file and output separator line when inactive
by imp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |