I have a text file in the following format:
HEADER1
HEADER2
COL1 COL2 COL3 COL4 COL5
With data in each column. What I'd like to do is extract, for example, all data in COL2 and COL4...and write those columns to another file. I also need to ignore the headers that appear before the data columns.
Is there a simple way to do this in Perl? Writing to a file is pretty easy, so really I just need a way to store the data in the columns I want into arrays.
Thanks for any and all help!
HEADER1
HEADER2
COL1 COL2 COL3 COL4 COL5
With data in each column. What I'd like to do is extract, for example, all data in COL2 and COL4...and write those columns to another file. I also need to ignore the headers that appear before the data columns.
Is there a simple way to do this in Perl? Writing to a file is pretty easy, so really I just need a way to store the data in the columns I want into arrays.
Thanks for any and all help!