|laziness, impatience, and hubris|
POE::Filter::Line InputRegexp Help Requestedby cmv (Chaplain)
|on Aug 18, 2010 at 13:57 UTC||Need Help??|
cmv has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to use POE::Wheel::Followtail and POE::Filter::Line to deliver messages to me from a file with a specific format. I'm trying to build the correct InputRegexp to get this to happen for me, but am having problems understanding why my attempts are not working. None of my attempts work, and the uncommented one gets me closest (but will also match things I don't want it to).
The attached script shows an example of the data format I have, and my stumbling through learning about InputLiteral and InputRegexp to try and get things to work as I'd like. A working script should provide output as follows:
On a side note, I'm wondering about message 6. In this case (assuming the file doesn't grow anymore) message 6 will never be output. Is that correct or is there some way to get it to assume message 6 is a single line and print it out if the file doesn't grow for say, 2 seconds? Also, if that could be done, then what would be a logical way to handle things when the assumption is wrong?
Update: Added readmore tags