Thank you all for the reply...
Daptal your program does exatctly what I want..exept i get error Date::Calc:
elta_YMDHMS(): not a valid date when I use a day gerater then 11. for example 11/15/2009 07:53:38 will not calculate the difference...
Below the actual log file data, i am still trying to modify the reg expression to capture the phrasees within a long lines of various characters and numbers.
The algorithm for the script for log file from a machine:
1. Find when the first time TV error occures end of the line with unique phrase ="MMeas"'
2. The TV error will stop the machine and multiple error might occure afterwards, the script should skip these errors.
3. Find when the machine start back up (W_NO) and within the long line there is this unique phrase name="WWWW_NO" and the value="A333BBBB.rf"
4. the output of the script should show (calculate) when the first TV error happens and when the machine start back up. These events could happen through out the day.
5. Calculate the total time differences of all the events (of waiting between the first error and next machine start).
Best Regards,,,
bataf