On Nov 23, 2003, at 6:36 PM, Paul Harwood wrote:
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?
I wouldn't think this could be happening IF the thread number already contained an array reference.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
