Advertisement

07.14.2008 at 10:32AM PDT, ID: 23563442
[x]
Attachment Details

join two csv files - left join

Asked by markpalinux in Perl Programming Language

Tags: perl

I am trying to think of the best way to join data from two separate csv files together.
I want to pull data form both where the first column matches, "mark" and "mark" from the examples below. Files will be under 3 megs in size, should I just slurp, should I use sqlite?

Thanks,
Mark

file1.csv
mark,35
jen,36
bob,40
judy,37


file2.csv
mark,male
jen,female
judy,female

result
mark,35,male
jen,36,female
judy,37,female
Start Free Trial
 
Loading Advertisement...
 
[+][-]07.14.2008 at 11:39AM PDT, ID: 22000730

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.14.2008 at 12:07PM PDT, ID: 22000998

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.14.2008 at 01:21PM PDT, ID: 22001726

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: perl
Sign Up Now!
Solution Provided By: clockwatcher
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.14.2008 at 07:19PM PDT, ID: 22003725

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.06.2008 at 11:55AM PDT, ID: 22173681

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628