in reply to Re: adding a new column to a CSV
in thread adding a new column to a CSV

I am having a bit of trouble with this because it seems to be putting quotes around some of the column values. Using an example tab limited file with 4 lines, the final column on every row apart from the last one is put in quotes

Also using this code

splice @$row, 1, 0, "New Col 2";
the new column text is in quotes which I don't want.

thank-you

Replies are listed 'Best First'.
Re^3: adding a new column to a CSV
by Tux (Canon) on Apr 25, 2011 at 07:07 UTC

    You obviously did not take the time to read the exhaustive documentation the comes with Text::CSV_XS. By default, fields with spaces are quoted. There is an option (attribute) available to do the opposite:

    quote_space By default, a space in a field would trigger quotation. As +no rule exists this to be forced in CSV, nor any for the opposite, +the default is true for safety. You can exclude the space from +this trigger by setting this attribute to 0.

    Enjoy, Have FUN! H.Merijn