I have a global array containing elements such as:
@myarray = ("A","B","C","D","E");
I'm reading a column line by line which has values like:
Row1: A
Row2: Z
Row3: B C
Row4: A B C
Row5: A B C Z
Row6: A C
Row7: E
- Problem 1 : If Row1 is read and has "A" which is present in @myarray -> no action required, but in case of Row2 "Z" is not a part of @myarray it should fail with some message.
- Some rows have multiple elements, it should check for all, for example row3 "A","B","C" all three are part of @myarray --> no action required, but incase of Row4 it should read "A" , "B","C", then comes "Z" which is not a valid element it should fail with some message.