[Israel.pm] CSV

Georges EL OJAIMI g-ojaimi at cyberia.net.lb
Tue Feb 24 10:46:43 PST 2004


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





More information about the Perl mailing list