I want to write a Perl script to find the variable if present in the TEST titles only, not in the FIRST, SECOND or THIRD titles. So there are N number of variables in a files before the TEST titles; But I want to match the variables after the TEST titles. If the TEST title doesn't have the variable need to print
variable not exist in first TEST (or Second TEST or Third TEST).
I have a file like below.
FIRST there is a variable one SECOND there is second variable THIRD there is third variable FOUR xxx xxx FIVE variable xxx TEST1 firstline 001 secondline 002 thirdvariable line 003 TEST2 firstline 001 secondline 002 thirdline 003 TEST3 firstline 001 secondline 002 thirdvariable line 003