Thanks Jeff,

I already tried that, because I read about the default value for
quote_char, escape_char but doesn't work. I can't figure out why. If I
don't set quote_char at all, all my fields (MSUID, ServiceType,...) are
not recognize individual and I'll have only one filed from all together. 

I eliminated the double quotes using a replacement pattern in FH but I
fell that this could be done somehow in the tabel definition.

Livia

Jeff Zucker wrote:
> 
> TIBA, LIVIA wrote:
> 
> 
> > my $dbh = DBI->connect("DBI:CSV:");
> > $dbh->{'csv_tables'}->{'PM_Report'} = {
> >       'eol' => "\n",
> >       'sep_char' => "|",
> >       'quote_char' => undef,
> >       'escape_char' => undef,
> >       'file' => './PM_Report'
> >        };
> 
> Remove that and use this instead:
> 
>    $dbh->{'csv_tables'}->{'PM_Report'} = {
>        'eol'      => "\n",
>        'sep_char' => "|",
>        'file'     => './PM_Report'
>    };
> 
> You don't want to define quote_char and escape_char as undef because
> that prevents  the module from removing the quotes that surround data.
> You want the quote_char to be double quote (") which is the default, so
>   simply omit it from your definition.
> 
> The quote_char setting is meant to define the character that delimits
> fields, i.e. a character that is treated as part of the structure, not
> part of the data.   For example:
> 
>     1. (quote_char % removed)
>     ----------------------
>     quote_char      %
>     example field   %Flintstone, Fred%
>     data            Flintstone, Fred
> 
>     2. (quote_char " removed)
>     -----------------------
>     quote_char      "
>     example field   "Flintstone, Fred"
>     data            Flintstone, Fred
> 
>      3. (nothing removed because no quote_char defined)
>      ------------------------------------------------
>      quote_char     undef
>      example field  "Flintsone, Fred"
>      data           "Flintstone, Fred"
> 
> You currently are doing #3 so you need to change the quote_char to
> double quote (") which is the default, so don't set quote_char at all.
> 
> --
> Jeff

Reply via email to