Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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.


Comment on Re: Low-threshold function in Text::CSV_XS
Select or Download Code
Re^2: Low-threshold function in Text::CSV_XS
by Tux (Monsignor) 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071997]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-07-30 00:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls