I wrote a function in perl where it reads in each file in a directory and checks for a tag:
Each file should have one of the sequences of tes tags as defined in these arrays.
I am trying to do the following - if the tag sequence in the match does not follow any one of the arrays, then continue onto the next array to see if there is a match there.
I could possibly store the tag values from the file into an array then compare. But the problem is that I only need to match the first 4 or 5 tags. Each file consists of 10 - 15 tags.
What would be the best way to do this?
@testarray1 = qw (QW1, LS3, DE3, TER);
@testarray2 = qw (GF3, LS3, RTL, ST);
@testarray3 = qw (LS5, R3E, DE3, EEW);
@testarray4 = qw (FFL, DRE, ASD, FGE, GFH, SDF);
#read all lines
foreach $entry (@testarray1)
if (/\<tes/ && /type=\"$entry\"/)
//matches! check the next entry
//stop checking this array, and check the next array