I meant, I want to read a tab-separated file and store the data that are now hard-coded into arrays... So, open the tab-separated file, create the 3 arrays and then pass them into @data, instead of writing their values by hand, like I do now...
Please note that the majority of the code you posted has nothing to do with your question: this just leads to confusion (and perhaps frustration) when attempting to isolate the handful of relevant lines from the two screenfuls of code you posted.
A better question will get better answers: the guidelines in "How do I post a question effectively?" can help you achieve this.