which would be anything after = and before ,
####
__DATA__
msgagt=ESM_WMB_AIX,sec_id=Sec
_id,severity=Low,node=test,msgnode=qwmbap01.xxxxxxxxxxxxx.net,utc=2007-04-26 18:01:59.472+00:00,om=UID=3a7affd6-f420-11db-80b1-000000000000,AlertCod
e=AEM001,AlertType=AEM-default,AppName=AEM-CommonService2,Message=5004:An error has been reported by the BIPXML4C component.:XML
__CODE__
1 use strict;
2 use warnings;
3 #use diagnostics;
4 use Data::Dumper;
5
6 my $ovo = qq(/home/mikej/out);
7 my $msgagt = qr/(?:\w+\=\w+)/; #|(?:\w+=\{.*?\}))/;
8 my ($key,$value);
9 my (%HoA,@HoA);
10
11 open (my $out, "+<", $ovo) or die "file '$ovo' was not opened $!";
12
13 while (<$out>) {
14 s/^\s+|\s+$//g; ## rid of newlines at begin and end
15 chomp;
16 next unless length $_; ## skip blanks
17 s/^'|'\w+|'.*?$//; ## rid of ticks and ticks plus metachars \w
18 s/\x7b|\x7d//g; ## rid of { and }
19 ($key,$value) = (split /=/, $_, 0);
20 #print "KEY:\t",$key,"\n";
21 #print "VALUE:\t",$value,"\n";
22 #push @{$HoA{$key}}, $value if (/$msgagt/g);
23 print "$_\n" if (/$msgagt/g);
24 }
25 #for my $i (sort keys %HoA) {
26 # print "$i -- @{ $HoA{$i} }\n";
27 #}
####
local $/ = ',';