Question : how to parse this text log into another txt format

Hello team experts,

i have this txt log files

Sample Id,Rep #,Product,Fat,Protein,Lactose,TS,SNF,Date,Time,Remark,
Calibration
AP P2,1,NEW FM,3.61,2.79,3.88,11.34,7.72,5/20/2004,12:27 PM,,
AP P2,2,NEW FM,3.61,2.80,3.86,11.34,7.72,5/20/2004,12:27 PM,,
AP P2,Mean,NEW FM,3.61,2.80,3.87,11.34,7.72,5/20/2004,12:27 PM,,
Sample Id,Rep #,Product,Fat,Protein,Lactose,TS,SNF,Date,Time,Remark,
Pilot definition
,1,Plain - Milk,3.80,3.27,4.89,13.01,9.40,6/18/2004,13:57 PM,,
,2,Plain - Milk,3.80,3.27,4.88,13.01,9.40,6/18/2004,13:57 PM,,
,Mean,Plain - Milk,3.80,3.27,4.89,13.01,9.40,6/18/2004,13:57 PM,,
Pilot test
,1,Plain - Milk,3.80,3.27,4.88,13.01,9.40,6/18/2004,14:00 PM,,
,2,Plain - Milk,3.80,3.28,4.88,13.02,9.41,6/18/2004,14:01 PM,,
,Mean,Plain - Milk,3.80,3.28,4.88,13.02,9.41,6/18/2004,14:01 PM,,
Sample Id,Rep #,Product,Fat,Protein,Lactose,TS,SNF,Date,Time,Remark,
Pilot definition
,1,Sweet Milk ,2.63,2.83,3.85,14.43,11.97,7/21/2004,15:17 PM,,
,2,Sweet Milk ,2.62,2.85,3.85,14.43,11.98,7/21/2004,15:18 PM,,
,Mean,Sweet Milk ,2.63,2.84,3.85,14.43,11.97,7/21/2004,15:18 PM,,
Sample Id,Rep #,Product,Fat,Protein,Lactose,TS,SNF,Date,Time,Remark,
Calibration
EVAP 1:1 E1 26.01.05.,1,COLLECT EVAP 1:1,7.27,17.87,7.49,22.26,13.50,1/26/2005,16:05 PM,,
EVAP 1:1 E1 26.01.05.,2,COLLECT EVAP 1:1,7.27,17.85,7.51,22.28,13.53,1/26/2005,16:06 PM,,
EVAP 1:1 E1 26.01.05.,Mean,COLLECT EVAP 1:1,7.27,17.86,7.50,22.27,13.52,1/26/2005,16:06 PM,,
Calibration
EVAP1:1 E1 27.01.05,1,COLLECT EVAP 1:1,7.28,17.92,7.64,22.29,13.61,1/27/2005,16:34 PM,,
EVAP1:1 E1 27.01.05,2,COLLECT EVAP 1:1,7.27,17.93,7.61,22.29,13.60,1/27/2005,16:35 PM,,
EVAP1:1 E1 27.01.05,Mean,COLLECT EVAP 1:1,7.28,17.92,7.62,22.29,13.61,1/27/2005,16:35 PM,,
Calibration
EVAP1:1 E2 27.01.05,1,COLLECT EVAP 1:1,7.23,18.01,7.56,22.15,13.49,1/27/2005,16:35 PM,,
EVAP1:1 E2 27.01.05,2,COLLECT EVAP 1:1,7.19,18.19,7.53,22.11,13.46,1/27/2005,16:36 PM,,
EVAP1:1 E2 27.01.05,Mean,COLLECT EVAP 1:1,7.21,18.10,7.54,22.13,13.48,1/27/2005,16:36 PM,,
Calibration
COLLECT EVAP 1:1 E1 28.01.05,1,COLLECT EVAP 1:1,7.42,17.38,7.56,22.36,13.55,1/28/2005,16:33 PM,,
COLLECT EVAP 1:1 E1 28.01.05,2,COLLECT EVAP 1:1,7.41,17.37,7.53,22.37,13.54,1/28/2005,16:34 PM,,
COLLECT EVAP 1:1 E1 28.01.05,Mean,COLLECT EVAP 1:1,7.42,17.38,7.54,22.37,13.55,1/28/2005,16:34 PM,,
Calibration
COLLECT EVAP 1:1 E2 28.01.0545,1,COLLECT EVAP 1:1,7.45,17.24,7.60,22.47,13.64,1/28/2005,17:15 PM,,
COLLECT EVAP 1:1 E2 28.01.0545,2,COLLECT EVAP 1:1,7.45,17.26,7.60,22.47,13.64,1/28/2005,17:15 PM,,
COLLECT EVAP 1:1 E2 28.01.0545,Mean,COLLECT EVAP 1:1,7.45,17.25,7.60,22.47,13.64,1/28/2005,17:15 PM,,
Calibration
COLLECT EVAP 1:1 31.01.05,1,COLLECT EVAP 1:1,7.09,18.33,7.16,21.61,12.93,1/31/2005,16:22 PM,,
COLLECT EVAP 1:1 31.01.05,2,COLLECT EVAP 1:1,7.09,18.31,7.16,21.61,12.93,1/31/2005,16:23 PM,,
COLLECT EVAP 1:1 31.01.05,Mean,COLLECT EVAP 1:1,7.09,18.32,7.16,21.61,12.93,1/31/2005,16:23 PM,,
Calibration
COLLECT EVAP E1 1:1 010205,1,COLLECT EVAP 1:1,7.73,16.78,8.03,23.19,14.29,2/1/2005,15:40 PM,,
COLLECT EVAP E1 1:1 010205,2,COLLECT EVAP 1:1,7.72,16.79,8.02,23.18,14.29,2/1/2005,15:40 PM,,
COLLECT EVAP E1 1:1 010205,Mean,COLLECT EVAP 1:1,7.73,16.78,8.03,23.18,14.29,2/1/2005,15:40 PM,,
Calibration
COLLECT EVAP E2 1:1 010205,1,COLLECT EVAP 1:1,6.93,18.82,7.09,21.33,12.77,2/1/2005,15:49 PM,,
COLLECT EVAP E2 1:1 010205,2,COLLECT EVAP 1:1,6.92,18.89,7.06,21.33,12.75,2/1/2005,15:50 PM,,
COLLECT EVAP E2 1:1 010205,Mean,COLLECT EVAP 1:1,6.92,18.85,7.08,21.33,12.76,2/1/2005,15:50 PM,,
Calibration
COLLECT EVAP 1:1 E1 02.02.05,1,COLLECT EVAP 1:1,6.98,18.71,6.92,21.33,12.64,2/2/2005,14:58 PM,,
COLLECT EVAP 1:1 E1 02.02.05,2,COLLECT EVAP 1:1,6.97,18.70,6.92,21.34,12.65,2/2/2005,14:59 PM,,
COLLECT EVAP 1:1 E1 02.02.05,Mean,COLLECT EVAP 1:1,6.97,18.70,6.92,21.33,12.65,2/2/2005,14:59 PM,,
Calibration
COLLECT EVAP 1:1 E2 02.02.05,1,COLLECT EVAP 1:1,6.94,18.75,6.88,21.25,12.57,2/2/2005,15:00 PM,,
COLLECT EVAP 1:1 E2 02.02.05,2,COLLECT EVAP 1:1,6.94,18.77,6.87,21.25,12.57,2/2/2005,15:01 PM,,
COLLECT EVAP 1:1 E2 02.02.05,Mean,COLLECT EVAP 1:1,6.94,18.76,6.87,21.25,12.57,2/2/2005,15:01 PM,,
Calibration
COLLECT EVAP 1:1 030205,1,COLLECT EVAP 1:1,7.14,18.29,7.58,21.97,13.42,2/3/2005,14:15 PM,,
COLLECT EVAP 1:1 030205,2,COLLECT EVAP 1:1,7.12,18.36,7.55,21.95,13.39,2/3/2005,14:16 PM,,
COLLECT EVAP 1:1 030205,Mean,COLLECT EVAP 1:1,7.13,18.33,7.56,21.96,13.41,2/3/2005,14:16 PM,,
Sample Id,Rep #,Product,Fat,Protein,Lactose,TS,SNF,Date,Time,Remark,
Calibration

and should be convert into like this
Sample Id,Rep #,Product,Fat,Protein,Lactose,TS,SNF,Date,Time,Remark,
Calibration
AP P2,Mean,NEW FM,3.61,2.80,3.87,11.34,7.72,5/20/2004,12:27 PM,,
,Mean,Plain - Milk,3.80,3.27,4.89,13.01,9.40,6/18/2004,13:57 PM,,
,Mean,Plain - Milk,3.80,3.28,4.88,13.02,9.41,6/18/2004,14:01 PM,,
,Mean,Sweet Milk ,2.63,2.84,3.85,14.43,11.97,7/21/2004,15:18 PM,,
COLLECT EVAP 1:1 030205,Mean,COLLECT EVAP 1:1,7.13,18.33,7.56,21.96,13.41,2/3/2005,14:16 PM,,
COLLECT EVAP 1:1 E2 02.02.05,Mean,COLLECT EVAP 1:1,6.94,18.76,6.87,21.25,12.57,2/2/2005,15:01 PM,,


so we just parse the text that contain "Mean" and copy it into new text file.

after that it will convert into another SAP text formatted.

we're using perl and hope any experts here could help me.

Thank you

Answer : how to parse this text log into another txt format

There are many ways to achieve drop down menu effects, most of which require some kind of tweak. You can use button effects, or roll over and roll out events like what you did. THe problem with your code is the interactions between buttons are quite unclear, for instance you add event RollOver of the Surface button to a function called floorOut. When it's true that when you roll over surface button, you want the floor button to close , however the way event handlers are added everywhere introduces high coupling code, and logic errors.

I've modified your code a little bit and and the effects are quite ok. There's a small bug though, that is sometimes when you move mouse over and out of the button too quickly, it can end up having the mouse over the button but the menu isn't open. I can live with that. It is fixable but maybe not worth the effort. Not sure about your client though.
Random Solutions  
 
programming4us programming4us