in reply to Combining tab delimited tables
Maybe you could post the code you already have. Along with the information how big your files are
If your files are relatively small, you just read in the first file and put it into a hash. Use the first column as key and the rest of the line as value (use split() to split the line). Then read in the second file and look for the first column in the hash. Voila. Don't forget to check if the value exists (Use the exists() function).
If your files are too big to fit in memory, you have two possibilities:
1) Use a hash that is stored in a file, for example with DBM::Deep
2) Sort both files on disk (if you use linux or some other unix dialect, just use the sort program). Then you can compare them line by line. Again it is useful to check if a line is missing in one file, also you have to remove the table header before you sort the files.
|
|---|