--- Brian Bukeavich <[EMAIL PROTECTED]> wrote:
> I need a little help with the split function. I'm trying to split a line 
> based on comma delimeters(,), but when I use the syntax below I don't get 
> the results I expect.  What am I doing wrong?  Is there a an special escape 
> sequence for a comma?
> 
> my @asLine = split (/,/, $_);

Just a quick guess, but much of the comma-delimited data that I see has quoted fields 
that have
commas embedded in the quotes:

  "Poe, Curtis", 34, "Aspiring Screenwriter, Programmer"

Trying to split the above line on commas will result in five fields instead of three.  
You should
probably use a module like Text::CSV or something similar.

If you show us some sample input, expected output, and actual output, we can offer 
better advice.

Cheers,
Curtis Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to