Hi guys I need a help in parsing the csv | tsv file. I would like to get each columns in an array and the name of array should correspond to the header column of the file. I am working on perl. Preferably suggestions in perl.
Tab separated file
A B C D E
227844250 - 38234815 - -
227824251 25029365 38234816 - 19554132
227344253 25029367 38234818 237786606 19554134
227834254 25029368 38234819 237786608 19554167
227834257 25029370 38234822 237784891 23309001
227834259 25029372 38234823 237786615 19554173
- 25027524 - - 19552119
Expected result I would like to get each column in an array with the array name taken from its first line [header] and not including it the array itself.
@A= (227834250 227834251 227834253 227834254 227834257 227834259 -)
@B= (- 25029365 25029367 25029368 25029370 25029372 25027524)
I found that useful, thanks. Is there maybe one extra backslash for the separator type?