Are you interested in checking all strings or just the first string? Could you include a few lines from an actual file and indicate your desired output? Thanks!
Also, I need a condition like this:
If, $first_word == xyz, followed by if $second_word == abc
as the lines have same format, I want the loop to be on a per line basis.
---LOOP SHOULD BE ON PER LINE BASIS