|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: Find error message starting at line after last errorby armstd (Friar) |
| on Oct 05, 2011 at 02:40 UTC ( #929700=note: print w/ replies, xml ) | Need Help?? |
|
I must be missing something here... You're slurping it line-by-line with <$tail>, and emailing the lines containing the error. What are you resetting file position for? The loop will just proceed to the next line automatically. Why close and reopen? I guess the log is being rotated underneath? For this sort of thing I'd probably read from a 'tail -F' pipe instead and keep the perl part trivial. Or use any of the multitude of CPAN tail modules, rather than trying to reimplement tail all over again. --Dave
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||