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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
how to reading only specific columns from input file to output file

 



genetist
Novice

Jun 5, 2013, 9:56 AM

Post #1 of 3 (736 views)
how to reading only specific columns from input file to output file Can't Post

Hi,
I am entirely new to this perl programming language but i have basics in this perl, Now i have very big text file with lot of columns for example more than 20,000, but here i want to take only some specified columns to my out put file. how can i do this in perl?, i came to know that perl handles very big data. Can any one help me in solving this problem.
Thanks in advance


Laurent_R
Veteran / Moderator

Jun 5, 2013, 10:23 AM

Post #2 of 3 (733 views)
Re: [genetist] how to reading only specific columns from input file to output file [In reply to] Can't Post

Are your columns separated by a special character (CSV tyoe)? Fixed length? Other?


FishMonger
Veteran / Moderator

Jun 5, 2013, 10:51 AM

Post #3 of 3 (731 views)
Re: [genetist] how to reading only specific columns from input file to output file [In reply to] Can't Post

20,000 columns in a singe row? If that's true then IMO the process that generates that file is poorly designed.

Depending on how the lines are constructed, the easiest way to extract a limited number of specific columns might be to use the split function along with an array slice.

You'll need to post some sample lines from the file and specify which fields you need to extract for us to be able to provide a more succinct answer.

 
 


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

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