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

Geovanny Junio :: eutsiv geovanny at eutsiv.com
Tue Jul 1 12:10:12 PDT 2014


Hi Robert!

Did you change the quote_char config?

my $csv = Text::CSV->new ({ binary => 1, quote_char => '"' });

Cheers,
--
Geovanny Junio
Consultor de Tecnologia
geovanny (at) eutsiv.com
+55 31 9422-8885
+55 31 2519-8603
www.eutsiv.com

Este e-mail pode conter informação privilegiada e confidencial. Se você não
é destinatário da
mensagem, por favor apague a mensagem e comunique-nos o fato de imediato.

This e-mail contains information that may be
privileged and confidential. If you are not the intended recipient, please
delete the e-mail and notify us immediately.


On Tue, Jul 1, 2014 at 3:26 PM, Robert L. Harris <robert.l.harris at gmail.com>
wrote:

>
> 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
>
> _______________________________________________
> Denver-pm mailing list
> Denver-pm at pm.org
> http://mail.pm.org/mailman/listinfo/denver-pm
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/denver-pm/attachments/20140701/7143bb32/attachment.html>


More information about the Denver-pm mailing list