Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Merging Files: A Different Twistby chromatic (Archbishop) |
on Sep 15, 2000 at 06:08 UTC ( [id://32605]=note: print w/replies, xml ) | Need Help?? |
This sounds like a case for a full fledged database... something like DBD::RAM could come in very handy.
If I understand your specification, however, you want to get data from one column in the first file, look for matches in one column of the second file and print the whole row that contains a match. This is why hashes were invented: That's very generic, and you'll probably want to change the split regex, at least. $column1 and $column2 are the 0-based numeric values of the columns you want to grab out of the specific files. If you don't have *exact* matches, you'll have to use a regex or String::Approx or something to do a fuzzy match. This ought to get you started, though.
In Section
Seekers of Perl Wisdom
|
|