http://www.perlmonks.org?node_id=1102315


in reply to Re^2: Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?
in thread Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?

The Anonymous Monk deleted the header row in the code provided above.

delete $row{Gene};

That seems like the easiest way to do it. To do what you are asking here you can use eof. Also refer to Variables related to filehandles

  • Comment on Re^3: Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?
  • Download Code

Replies are listed 'Best First'.
Re^4: Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?
by coolda (Novice) on Sep 29, 2014 at 16:50 UTC
    oh yes i noticed that, however my actual files has one more line above the row deleted by
    delete $row{Gene};
    So i need to skip the first row and then delete the Gene row.. thanks for the input, i'll look into the links
Re^4: Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?
by coolda (Novice) on Sep 29, 2014 at 19:30 UTC
    i used next if /^/ ; it works well!! thanks,