Being new to PERL, I'd like a bit of help writing a script to extract some data from a daily produced Textual Report file. The report file conatins the following data:-
Report 5: CPU Availability
Heading 1
Heading 2
Hour Box1 Box2 Box3
01:00 100.00 39.35 100.00 24.14 100.00 19.00
02:00 100.00 38.27 100.00 29.19 100.00 24.09
etc.......
I need to search through the text file to "Report 5", as it contains many other reports, and then extract the hourly data into the following format:-
Rep5,01,100.00,39.35,100.00,24.14,100.00,19.00
Rep5,02,100.00,38.27,100.00,29.19,100.00,24.09
where fields are:-
reportnum,hour,box1dataa,box1datab,box2dataa,box2datab,box3dataa,box3datab
Which I will then feed into a MySQL DB for analysis & graphical reporting.
Unfortunately I cannot guarantee that the lines I need will always be in the same place in the text file.
Can anyone help me please.
Report 5: CPU Availability
Heading 1
Heading 2
Hour Box1 Box2 Box3
01:00 100.00 39.35 100.00 24.14 100.00 19.00
02:00 100.00 38.27 100.00 29.19 100.00 24.09
etc.......
I need to search through the text file to "Report 5", as it contains many other reports, and then extract the hourly data into the following format:-
Rep5,01,100.00,39.35,100.00,24.14,100.00,19.00
Rep5,02,100.00,38.27,100.00,29.19,100.00,24.09
where fields are:-
reportnum,hour,box1dataa,box1datab,box2dataa,box2datab,box3dataa,box3datab
Which I will then feed into a MySQL DB for analysis & graphical reporting.
Unfortunately I cannot guarantee that the lines I need will always be in the same place in the text file.
Can anyone help me please.