On Sat, 10 Aug 2002 06:46:40 -0500, [EMAIL PROTECTED] (Mikeblezien)
wrote:

>I'm trying to correct some shopping cart files that got messed up and need to be
>reformatted, so we can rebuild the database from these text order files. This is
>a sample of some of the data:
>
>order_items::PF110::1::::::::::::89.95::0.00::89.95::::::::::
>^^GG111::1::::::::::::49.95::0.00::49.95::::::::::
>
>Now each of these "order_items" lines, I need to grab the lines from the file,
>IE:
>order_items::PF110::1::::::::::::89.95::0.00::89.95::::::::::
>^^GG111::1::::::::::::49.95::0.00::49.95::::::::::
>
>then put it all on one line, IE:
>order_items::PF110::1::::::::::::89.95::0.00::89.95::::::::::^^GG111::1::::::::::::49.95::0.00::49.95:::::::::

The first thing I would try is slurping in the data into 1 long
string, with $/=undef; then splitting on 'order_items'. Then
set $"="\n"  and print out the array. Each line should begin
with order_items.  




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to