The issue I am now faced with is to find the end to each start call IE:
<09/25/02 20:07:53.115 [21168]>|thread: 7: start getProducts getPruducts was started in thread 7 and would always end in thread 7, but it could be 10 - 15 lines further in the file. I have the following to get the info I need from each line while(<FH>) { if ( /start/ ) { ($date,$thread,$type,$call) = (split)[1,3..5]; push(@Stats, join(' ', (split)[1,3..5])); } if ( /end successful/ ) { push(@Stats2, join(' ', (split)[1,3..6])); } } Dont think this is the best way (using arrays), now I need to traverse each array and match up each start/end call and thread then do the magic time stuff . Regards, Ronald J. Yacketta Principal Consultant Ciber, INC 345 Woodcliff Dr. Fairport, NY 14450 ----------------------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- -----Original Message----- From: nkuipers [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 12:32 To: Yacketta, Ronald Cc: [EMAIL PROTECTED] Subject: RE: need some parsing ideas ) Well here's an idea anyway... I wouldn't slurp the whole file at once, I would process line by line assuming all pertinent info per entry is a 1-liner as shown. You could first split on | which gives portionA, portionB. For portionA, split on white space; the second field is the time. For portion B, use a regex to grab the "thread: number" as a hash key. There must be a module or unix tool for converting colon delimited time to minutes/seconds, and back again. By hook or by crook, do this conversion and += the hash with the resulting value. ?? Cheers, Nathanael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]