in reply to Check multiple lines exist in a record

Hello gbwien,

I was under the impression that your question was answered before Grouped Regular Expression not set assign default value. In case that was not answered from your sample of code you are creating a function and you call the function internally of the function again without processing any parameters.

I am not sure what you want. Do you want to pass the file e.g. inside the function and retrieve the output?

Can you provide us with more information?

Looking forward to your reply, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: Check multiple lines exist in a record
by gbwien (Sexton) on Mar 26, 2018 at 14:06 UTC
    Hi thanos1983, Thanks for your help. Yes part of my questions were answered in that post but I still have other questions relating to resolving the entire problem. In the example program I provided I am trying to trigger the scenario were two lines are found to exist in an input file, in this case the lines CFU-TS10-ACT and CFB-TS10-ACT. If I change the if statement to the following then this works fine as would be expected
    if (/\t*CF=(CFU-TS10-ACT-(NONE|\d+))/)
    But I do not know how to check for the existence of two lines.

      Hello again gbwien,

      Try something like this:

      Since you did not provide us with more than one subsection of your file or desired output I am not able to help you more than that.

      Hope this helps, BR.

      Seeking for Perl wisdom...on the process of learning...not there...yet!