The log files I am parsing have threads (a T followed by several
alphanumeric numbers) associated with each line of text. I want to push
each value of $2 (which is a server name) into an anonymous array. 

This works fine in the following code.


if ($_ =~ /(T[0-9A-F]+) <MSM> SCTS\((.+)\)/)
                                {
                                        my $thread = $1;

                                        push @{$server{$thread}}, $2
unless grep $_ eq $2, @{$server{$thread}};
                                                
                                
                                }

The problem I just realized is that sometimes a duplicate thread number
exists and it overwrites the information it previously had in it. How do
I create a unique data structure that can prevent this from happening?

--Paul

Reply via email to