Ok, I'm assigning 500 to what should be an easy question but 1) I need it quickly, and 2) it's driving me nuts.
Why doesn't "Event Log Watcher" get assigned to $process in the script below. I only get "Event Log".
#!/perl
use warnings;
use strict;
my $trap = 'Host:Windows_NetServer Windows_NetServer caiWinA3 Poll WinA3_ProcInst OK Critical Event Log Watcher';
my $regex = '.*ProcInst\s+(?:Warning|C
ritical|OK
|Unknown|R
epaired|Up
)\s+(?:War
ning|Criti
cal)\s+(.*
)';
( my $process ) = $trap =~ / $regex /;
print $process;
exit;
Start Free Trial