Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Low-threshold function in Text::CSV_XS

by moritz (Cardinal)
on Jan 24, 2014 at 20:57 UTC ( #1071997=note: print w/replies, xml ) Need Help??

in reply to Low-threshold function in Text::CSV_XS

Some assorted, unorganized feedback follows:

I'm all for a versatile, easy-to-use function. But please don't call it csv2list when it doesn't actually return a list.

There's already enough array vs. list confusion without you contributing even more to it :-).

csv2array is only slightly longer.

It would be really awesome if there would be corresponding array2csv function that accepts mostly the same arguments, and round-trip the data back to original CSV (or as close as possible).

I would also love to have an option to have the first row treated as table headers (and thust column names for the hash variant), which would also imply that there must be some option to force the return format that isn't passing in a headers array reference.

Replies are listed 'Best First'.
Re^2: Low-threshold function in Text::CSV_XS
by Tux (Abbot) on Jan 24, 2014 at 21:16 UTC

    I am already converted to csv. I like your quest for the reverse trip. I have to ponder a bit if it can use the same function or if there really need to be two.

    headers => "auto" is exactly what you ask for in the last paragraph.

    Enjoy, Have FUN! H.Merijn

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071997]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2018-05-26 20:39 GMT
Find Nodes?
    Voting Booth?