Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Re: Re: reading output from another scriptby Limbic~Region (Chancellor) |
on Jul 24, 2003 at 13:44 UTC ( [id://277532]=note: print w/replies, xml ) | Need Help?? |
Octavian,
I do not see how this is possible without modifying the original script at least a little. When you use IO::Tee, you will be able to tie both the LOG and STDOUT to the same filehandle, so that wherever there is a print statement - it will print in both places. By setting auto-flush ($|), you will see events in the log as they happen (or pretty close). The script you write will have to use File::Tail to constantly be checking the bottom of the log looking for a specific event, which will trigger a desired action - such as email/page. I am not sure how to help beyond this without seeing the code of the original script, some sample output, and what "events" would like a trigger action. Cheers - L~R
In Section
Seekers of Perl Wisdom
|
|