Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Find error message starting at line after last error

by armstd (Friar)
on Oct 05, 2011 at 02:40 UTC ( #929700=note: print w/replies, xml ) Need Help??


in reply to Find error message starting at line after last error

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

  • Comment on Re: Find error message starting at line after last error

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929700]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2016-12-02 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (48 votes). Check out past polls.