symgryph has asked for the wisdom of the Perl Monks concerning the following question:
I am then 'chopping up' log entries using split based upon white space, and would like to 'test' field order as defined in a first line of log:Key Lookup $(server_connection.socket_errno) [\d\-]+ %t \d\d/\d\d/\d\d\d\d:\d\d:\d\d:\d\d
Then input to follow in 'separated by whitespace same order as 'first line' as noted above$(server_connection.socket_errno) %t blah
Ultimately I want to know if there is a 'miss' or a 'hit' Which I know can be nicely done with a counter. I'm not really looking for 'code' but more for ideas since I did write some, but it was quite messy.my-test 10:00
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using a 'hash' of regexes, then seeing if they match based upon a 'split' mapped to an array?
by Discipulus (Canon) on Apr 12, 2016 at 06:55 UTC | |
|
Re: Using a 'hash' of regexes, then seeing if they match based upon a 'split' mapped to an array?
by AnomalousMonk (Archbishop) on Apr 12, 2016 at 15:17 UTC |