I have modified your code to print based on two search parameters. To continue, i want to move 4 lines of code which are retrieved in the first part of the if statement to array1 and 1 line of code retrieved in the second part of the elsif statement to array2.
Code:
open(f1,"input.log")...