marylein has asked for the wisdom of the Perl Monks concerning the following question:
Hello, this is a very naive question from someone who forgot how to use Perl..here is my problem:
i have two tab delimited text files, each one has 2 columns. File 1: line 1: goes | go; line 2: leaves | leave; line 3: sees | see; line 4: eats | eat. And File 2: line 1: went | go; line 2: jumped | jump; line 3: saw | see; line 4: ate | eat.
I need to create File 3, which contains all verbs which are contained BOTH in the 2nd column of file 1 and in the 2nd column of file 2, and combines their information. I would look like this, 3 columns: File 3: line 1: go | goes | went; line 2: see | sees | saw; line 3: eat | eats | ate.
From what I remember there is a very fast way to do it in Perl..but I don't know how..What would be the script which does it?
Thank you!!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: script to merge files
by davido (Cardinal) on Sep 23, 2011 at 16:17 UTC | |
|
Re: script to merge files
by aaron_baugher (Curate) on Sep 23, 2011 at 16:55 UTC | |
|
Re: script to merge files
by pvaldes (Chaplain) on Sep 23, 2011 at 16:11 UTC | |
|
Re: script to merge files
by graff (Chancellor) on Sep 24, 2011 at 04:58 UTC |