Question about extracting a column from a textfile using Perl...?

  • Thread starter Thread starter PSUMeteoMedic
  • Start date Start date
P

PSUMeteoMedic

Guest
I have a text file in the following format:

HEADER
HEADER
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? Can I tell Perl to start at a specific line number?

Thanks for any and all help!
 
Back
Top