in reply to Re^2: Double quotes in CSV using Text::CSV
in thread Double quotes in CSV using Text::CSV

WHY? Why can 1 and 2 not be quoted? I could add quote_empty => 1 to Text::CSV_XS, but you've shown me no good reason so far.

"1","2","" is just as valid CSV as 1,2,"" and 1,2, are and on parsing they'll all yield the same data (unless parsing options cause different rules).


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^4: Double quotes in CSV using Text::CSV
by afoken (Chancellor) on May 19, 2015 at 19:12 UTC

    Two ideas:

    Saving bytes
    Yes, despite having Gigabit networks and Terabyte harddisks, some people discuss every single byte.
    A primitive type system on top of CSV
    Unquoted numbers represent numbers, quoted numbers are just strings (as in JSON).

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      #3: The homework assignment says not to quote them.

      Aaron B.
      Available for small or large Perl jobs and *nix system administration; see my home node.