in reply to Help with creating output to screen...

Your 'PER' and 'EMP' separators are on separate lines from the rest of the data, so when you match, e.g., /^PER/, there is nothing ELSE in @data (except $data[0] eq 'PER').