I figured regular expressions where the solution but I'm just starting to
learn how to use regular expressions.  

Also, only the first field always has a comma between the quotes.  The other
fields are not consistent.  

Joshua Scott
Security Systems Analyst, CISSP
626-568-7024


-----Original Message-----
From: Konrad Foerstner [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 16, 2003 3:29 PM
To: Scott, Joshua
Cc: [EMAIL PROTECTED]
Subject: Re: Splitting a variable


On Thu, 16 Jan 2003 15:12:05 -0800
"Scott, Joshua" <[EMAIL PROTECTED]> wrote:

> I've got a CSV file which I need to process.  The format is as 
> follows.
> 
> "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida "Doe, John 
> L",1/1/2002,1/15/2002,Los Angeles, California
> 
> I've tried splitting it using:  @row = split(",",$data);
> 
> The problem is with the fields that contain the commas between the 
> quotes. It's splitting the fields at each of these fields as well and 
> I'd like to know how to avoid that.
> 
> Any help is greatly appreciated!

What's about regular expression? If all you lines look like this you could
use them. Are you familiar with them?

Konrad


==============================================================================
NOTICE - This communication may contain confidential and privileged 
information that is for the sole use of the intended recipient. Any viewing,
copying or distribution of, or reliance on this message by unintended
recipients is strictly prohibited. If you have received this message in
error, please notify us immediately by replying to the message and deleting
it from your computer.

==============================================================================


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

Reply via email to