in reply to Perl script to match a regexp in the prior line and other multiple lines

I am not able to link the regexp logic to match it based on the output file . Could you help me out ?

So you don't have an algorithm and have been unable to write one? I would suggest something like this.

  1. Parse the Pin Numbers and store them as strings in an array.
  2. Parse/store the next scan line.
  3. Extract positions of carets in the following line.
  4. Associate these with the H/L values stored at 2 and the pins at 1. Print a line of output for each caret.
  5. Go to 2 until the input has all been read.
  • Comment on Re: Perl script to match a regexp in the prior line and other multiple lines