[Israel.pm] CSV

Eitan Schuler Eitan.schuler at exlibris.co.il
Tue Feb 24 23:18:31 PST 2004


The problem is that in CSV file you can't make a difference between data and
header rows.
Please specify the task more accurately. At least do you know the names of
the columns?

Eitan

-----Original Message-----
From: Georges EL OJAIMI [mailto:g-ojaimi at cyberia.net.lb]
Sent: Tuesday, February 24, 2004 8:47 PM
To: perl at perl.org.il
Subject: [Israel.pm] CSV


Hello,

I have a large CSV file containing personal information about clients in
the following format:

# Input Blocks
category,class,service,month,year
A23,class A,subcontract,jan,2003
,id,sex,year,lastname,middlename,firstname,
,33,male,1980,last,middle,first
,34,female,1981,last,middle,first

I want to make it appear this way:

# Output Blocks
category,class,service,month,year,id,sex,year,lastname,middlename,firstname,

A23,class A,subcontract,jan,2003,33,male,1980,last,middle,first
A23,class A,subcontract,jan,2003,34,female,1981,last,middle,first

Does any one have any good idea of processing such file, my knowledge in
PERL is not that much so my traditional way of solving this problem
didn't help.
P.S. The Input Blocks are listed one after the other.

Best Regards,
Georges


_______________________________________________
Perl mailing list
Perl at perl.org.il
http://www.perl.org.il/mailman/listinfo/perl

YAPC::Israel::2004
http://www.perl.org.il/YAPC/2004/



More information about the Perl mailing list