I have a file with about a 1000 or more records in the following format(this is one record,imagine it all in one line):
5/31/2006 0:00:00|"EMS"|"mBlox"|"25255"|"Alltel"|"0014172290558"|38.00|43.00|"Sexy"|"How bout tellin me yah name now =)"|"Hi there sexy thing.. wanna talk?"|4/30/2006 23:40:48|4/30/2006 0:00:00|5/1/2006 17:51:32|5/1/2006 0:00:00|4/30/2006 23:43:22|4/30/2006 0:00:00|"out"||37.62|42.57|"31 - 60 Days"|"21 - 40"|"Less than $50.99"|31.00
But some of the records are cut off for some reason like this(it's cut off after "Sexy and the rest of it shows as a new record):
5/31/2006 0:00:00|"EMS"|"mBlox"|"27772"|"Alltel"|"0014802043951"|1.00|1.00|"Sexy
''CLOWNIN AROUND''"|"ohh ok here from New Mexico how old are you whar is your name?"|"ohh ok here from New Mexico how old are you whar is your name?"|5/1/2006 7:36:49|5/1/2006 0:00:00|5/1/2006 9:58:25|5/1/2006 0:00:00|5/1/2006 9:58:25|5/1/2006 0:00:00|"out"||0.99|0.99|"Less than 30 Days"|"Less than 20"|"Less than $50.99"|30.00
What i want to do now is write a perl script which processes this file so that when each line in the file does not start with the date,then merge it with the previous line i.e., the ENTER key character needs to be gone...hope you understand my question.
I'm new to PERL and have no idea on how to implement this...can someone help.Thank you very much!
5/31/2006 0:00:00|"EMS"|"mBlox"|"25255"|"Alltel"|"0014172290558"|38.00|43.00|"Sexy"|"How bout tellin me yah name now =)"|"Hi there sexy thing.. wanna talk?"|4/30/2006 23:40:48|4/30/2006 0:00:00|5/1/2006 17:51:32|5/1/2006 0:00:00|4/30/2006 23:43:22|4/30/2006 0:00:00|"out"||37.62|42.57|"31 - 60 Days"|"21 - 40"|"Less than $50.99"|31.00
But some of the records are cut off for some reason like this(it's cut off after "Sexy and the rest of it shows as a new record):
5/31/2006 0:00:00|"EMS"|"mBlox"|"27772"|"Alltel"|"0014802043951"|1.00|1.00|"Sexy
''CLOWNIN AROUND''"|"ohh ok here from New Mexico how old are you whar is your name?"|"ohh ok here from New Mexico how old are you whar is your name?"|5/1/2006 7:36:49|5/1/2006 0:00:00|5/1/2006 9:58:25|5/1/2006 0:00:00|5/1/2006 9:58:25|5/1/2006 0:00:00|"out"||0.99|0.99|"Less than 30 Days"|"Less than 20"|"Less than $50.99"|30.00
What i want to do now is write a perl script which processes this file so that when each line in the file does not start with the date,then merge it with the previous line i.e., the ENTER key character needs to be gone...hope you understand my question.
I'm new to PERL and have no idea on how to implement this...can someone help.Thank you very much!