On Wed, 26 Feb 2003 17:34:10 +1100, Clinton wrote:
> I'm trying to parse an uploaded csv file. From the HTTP info I have a string
> that looks like this
> ...
> Unfortunately if the CSV file has punctuation (Wilfred De'Silva) everything
> falls in a heap.
> How can I pull out the data without rely
n" <[EMAIL PROTECTED]>
To: "'Clinton'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 26, 2003 6:57 PM
Subject: RE: parsing uploaded csv file from HTTP
>
> It's late so maybe I'm missing something, but here's one way:
&
It's late so maybe I'm missing something, but here's one way:
#throw away the header and keep everything after
"application/octet-stream"
my($junk,$data2) = split(/application\/octet-stream/,$data);
#split the rest up by commas and put it into an array
my @records = split(/,/,$data2);
Th