kshitij has asked for the wisdom of the Perl Monks concerning the following question:
Hi Guys ,
I am having one input file as stated below
Input file
p p p p p Pin Numbers 3 2 1 8 9 1 2 3 4 5 pattern offset scan1 2965 H L H L H ^ scan2 2200 L H H L H ^ scan3 1100 H L L L L ^ scan4 1500 L L H H H ^ scan5 2800 H H L H H ^ ^
I want to match the ^ in the previous line H or L operation and also the Corresponding pin number which is at the top The output file should be like this
Output file
pattern offset pin_num scan1 2965 p13 H scan2 2200 p22 H scan3 1100 p22 L scan4 1500 p13 H scan5 2800 p22 H scan5 2800 p95 H
I am not able to link the regexp logic to match it based on the output file . Could you help me out ? Thanks a lot
|
|---|