I have a text file where each new record starts on a new line and for each record the fields are tab delimited. The text file looks something like:
ID1\t NAME1\t AGE1\t LOCATION1 \n<br>
ID2\t NAME2\t AGE2\t LOCATION2 \n<br>
ID3\t NAME3\t AGE3\t LOCATION3 ... and so on
Further I know that the ID field will take 10 spaces, the NAME field will take 15 spaces, AGE field will take 2 spaces and LOCATION field will take 20 spaces.
I want my Perl script to read this text file and store each record in an array. That means it should store ID1, NAME1, AGE1 and LOCATION1 in array1 and ID2, NAME2, AGE2 and LOCATION2 in array2, and so on...
Can someone help me to write this script?