in reply to Re: Outputting syslog to some perl code
in thread Outputting syslog to some perl code
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