I am looking to see if there could be a clever way to read a tab-separated file (copied from an excel sheet) vertically.
Image that you have:
NAME LAST_NAME PHONE EMAIL
John Smith 1234 firstname.lastname@example.org
Peter Jones 6789 email@example.com
George Lukas 9086 firstname.lastname@example.org
and you want to print out firstly the list of names, then the list of last names, the list of phones and the list of emails.
My approach (maybe a stupid one) would be to read the first line, split it using "\t" as delimeter, and then, while reading each line, splitting them as well and appending, for example, the preffix NAME to each element of each line that appears in the  position of the temporary array that will be created.
Can you show me another, more efficient way for this?