CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate: Relatively simple data extraction: Edit Log

New User

Oct 12, 2012, 4:58 AM

Views: 4371
Relatively simple data extraction

Hi guys, I am a complete beginner when it comes to perl, and I have been set a task that is beyond me.

I have a whole bunch of files, each with 6 columns of data. I need to extract the first 2 columns of data from each of these files and have them all print out into an outfile.

The files that are being extracted from are sequential, so the data needs to be extracted in order. When I say sequential I mean like "file.1.1, file.3.1, file.5.1, etc".

I feel like I could probably use a cat command to paste the whole thing into one file and then just use sed to delete the last 4 columns, but I was hoping someone could show me a better way in perl?

Thanks, Shlam.

(This post was edited by shlam16 on Oct 12, 2012, 5:05 AM)

Edit Log:
Post edited by shlam16 (New User) on Oct 12, 2012, 5:05 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives