Technically I wouldn't normally have the open and close inside the loop, it was there as one of the last things I tried (thinking on the off chance that it might be something funky with the IO coming from syslog).
I took the LINUX syslog(5) manpage to mean you could pipe the logdata to a normal command and then do what you would with the data.
I am trying to parse the openldap log files for failed authentication messages and based on that re-write the data to a IPTABLES format to stop any attempts to access a given IP until authentication is correct. I've got some failry complex (for me anyway) regex writtenm inside that loop to parse the log data, but have gotten stuck with this whole syslog issue.
Based on your replies, I think my knowledge is lacking in the area of "named pipes" as opposed to pipes as I understood them.
SO, I guess this isn't really a perl issue at this point, but I am stumped as to where go look for resolution. I guss I will go back to logging to a file and then use perl's IO::Handle functions to continaully monitor the trailing end of said file. I just thought it ould be more elegant to send the data directly to my program, doe my processing on it and write the log file out from within POST processing.
Binford
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.