I am trying (big emphasis on trying ) to write a script to parse log files, I thought it would be a good idea to store the regex in a hash table and use the event ID as the key.
So that I can add to the hash table as new log messages types are added.
My problem is that I get the regex string working properly but when I put it in a variable it stops working, a quick example is the regex to extract the event ID
this works:
$current_line =~ q{\A.*?
}xms';
$current_line =~ $RGX_EVENTID;
$event_id = $1;
I'm not understanding what I'm doing wrong.
Sal