I’m a beginner on Perl programming and I spend a few hours to find some information about how to read 2 file and parse them together
The first file is the log file containing some values, the second file is the reference file used to find the variable and compare the value on the log file (my reference file will have the compare operator)
Only the last value of the log file is important for me, the last value will be used for the output.
The output should indicate the values that I look for (from the reference file) and also an indication of pass or fail depending on the compare value of both variables
Thanks in advance for you help.
Log file looks like this:
StartMarker
<Step Name>
<Locals> Variable Value
aa 0.00e+000
bb 0.00e+000
cc 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
gg 0.00e+000
hh 0.00e+000
ii 0.00e+000
jj 0.00e+000
<FileGlobals> Variable Value
<StationGlobals> Variable Value
EndMarker
StartMarker
<Step Name>
<Locals> Variable Value
aa 0.00e+000
bb 0.00e+000
cc 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 1.00e+005
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
gg 0.00e+000
hh 0.00e+000
ii 0.00e+000
jj 0.00e+000
<FileGlobals> Variable Value
<StationGlobals> Variable Value
EndMarker
StartMarker
<Step Name>
<Locals> Variable Value
aa 0.00e+000
bb 0.00e+000
cc 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
dd 1.00e+006
ee 0.00e+000
ff 5.38e+003
gg 0.00e+000
hh 0.00e+000
ii 0.00e+000
jj 0.00e+000
<FileGlobals> Variable Value
<StationGlobals> Variable Value
EndMarker
Reference file look like this:
dd >= 6.00e-006
ff <= 1.00e-006
The first file is the log file containing some values, the second file is the reference file used to find the variable and compare the value on the log file (my reference file will have the compare operator)
Only the last value of the log file is important for me, the last value will be used for the output.
The output should indicate the values that I look for (from the reference file) and also an indication of pass or fail depending on the compare value of both variables
Thanks in advance for you help.
Log file looks like this:
StartMarker
<Step Name>
<Locals> Variable Value
aa 0.00e+000
bb 0.00e+000
cc 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
gg 0.00e+000
hh 0.00e+000
ii 0.00e+000
jj 0.00e+000
<FileGlobals> Variable Value
<StationGlobals> Variable Value
EndMarker
StartMarker
<Step Name>
<Locals> Variable Value
aa 0.00e+000
bb 0.00e+000
cc 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 1.00e+005
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
gg 0.00e+000
hh 0.00e+000
ii 0.00e+000
jj 0.00e+000
<FileGlobals> Variable Value
<StationGlobals> Variable Value
EndMarker
StartMarker
<Step Name>
<Locals> Variable Value
aa 0.00e+000
bb 0.00e+000
cc 0.00e+000
dd 0.00e+000
ee 0.00e+000
ff 0.00e+000
dd 1.00e+006
ee 0.00e+000
ff 5.38e+003
gg 0.00e+000
hh 0.00e+000
ii 0.00e+000
jj 0.00e+000
<FileGlobals> Variable Value
<StationGlobals> Variable Value
EndMarker
Reference file look like this:
dd >= 6.00e-006
ff <= 1.00e-006