in reply to Mysql and tail

|| 1. What Perl modules are recommended here?

| the modules you are looking for are DBI and DBD::MySQL.

I would also suggest looking at Class::DBI. It's really really nice.

As for how I would do it, and this is completely untested but, I would probably insert a column just for keeping track of line numbers. The program that pulls the logs in can increment this easily and you can do the same on the 'tail'-ish program.

When your dbtail is run, it finds the highest number in that column, backs up say 5 lines or so, displays that to the highest number. Then in a loop or something like that, query for a higher number than your last count.

I'm pretty tired and that could very well not work at all, but at the moment it seems like a good start.