Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Incosistent delimeterby spacegeologist (Initiate) |
on Apr 21, 2011 at 01:31 UTC ( [id://900449]=perlquestion: print w/replies, xml ) | Need Help?? |
spacegeologist has asked for the wisdom of the Perl Monks concerning the following question: I am using split to separate array elements. The data looks like this: 1, 2, 3,"a,b,c","d", 4, ect... I need it to be separated like this: 1 2 3 a,b,c d 4 I've tried split /,\s+|,"/ but the results are inconsistent. I need use commas as the delimiter except when they are surrounds by quotes. Any ideas?
Back to
Seekers of Perl Wisdom
|
|