[Denver-pm] Text::CSV not parsing embedded commas?

Robert L. Harris robert.l.harris at gmail.com
Tue Jul 1 11:26:32 PDT 2014


Given this line:

$_=  file1,field2,field3,"more text, in this field 4",field5,field6

I would expect the output of ( $va1, $var2, $var3, $var4, $var5, $var6
)=$csv->fields(); to yield:

$var1=field1
$var2=field2
$var3=field3
$var4="more text, in this field 4"
$var5=field5
$var6=field6

Instead though I get

$var1=field1
$var2=field2
$var3=field3
$var4="more text
$var5= in this field 4"
$var6=field5

What am I missing?

Robert



-- 
:wq!
---------------------------------------------------------------------------
Robert L. Harris

DISCLAIMER:
      These are MY OPINIONS             With Dreams To Be A King,
       ALONE.  I speak for                      First One Should Be A Man
       no-one else.                                     - Manowar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/denver-pm/attachments/20140701/f234ec09/attachment.html>


More information about the Denver-pm mailing list