Need help writing a perl script to manipulate file data?

vamsi v

New member
Hi All

Thanks in advance for your replies.

My issue is as follows.

I have to do a mass insert of almost 2gb worth of similar data into my database and I need to configure the raw data in such a way that I can do a block insert into my db.

The file in its original format is as follows

1




1992-09-01
10:59:32
02002









1992-09-01
10:59:32


1
NA
ENT
55
N
S/Holder Details Change in Substantial (S.43)

------------------------------

I simply need to make it look like

ENT,1992-09-01,10:59:32,55, S/Holder Details Change in Substantial (S.43)


Any help would be greatly appreciated. I have tried various scripts and all but the regex operation is beyond me.
(Note the space in the original format is actually how it is in the actual file.)
 
Back
Top